Skip to content

Add Telegram flow for channel intake#252

Merged
Fillll merged 2 commits intomasterfrom
feature/private-channel-intake
Apr 9, 2026
Merged

Add Telegram flow for channel intake#252
Fillll merged 2 commits intomasterfrom
feature/private-channel-intake

Conversation

@Fillll
Copy link
Copy Markdown
Owner

@Fillll Fillll commented Apr 9, 2026

Summary

Add a private Telegram chat flow for channel creation and updates.

This lets the owner talk to the bot directly and add or update channel records in Mongo without editing files or running manual scripts.

What Changed

  • reworked tech_receiver into a stateful private-chat intake flow
  • support both:
    • one structured message with subreddit, channel, tags
    • step-by-step conversation
  • added commands:
    • /newchannel to start/restart a draft
    • /cancel to clear the current draft
    • /help for usage instructions
  • normalize Reddit URLs, r/..., @channel, and t.me/... inputs
  • add DB upsert support so existing channel records can be updated
  • run tech_receiver every minute instead of hourly so the chat feels responsive
  • add tests for:
    • step-by-step flow
    • single-message flow
    • preserving Telegram update offset when there are no updates

Why

The current receiver only supports one rigid message format and only inserts new channels. It also polls hourly, which makes a private “conversation” impractical. This
change makes channel intake usable as an actual bot conversation and keeps the DB as the source of truth.

Validation

  • ./.venv/bin/python -m pytest -q
  • result: 7 passed, 10 skipped

Notes

This is restricted to the configured owner account (telegram.papa, currently XXXXX).
After merge, restart the consumer so the running process picks up the new receiver flow.

@Fillll Fillll merged commit fa7fe9c into master Apr 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant