Skip to content

feat: Telegram topics support#166

Merged
spalen0 merged 4 commits intomainfrom
topics
Mar 31, 2026
Merged

feat: Telegram topics support#166
spalen0 merged 4 commits intomainfrom
topics

Conversation

@spalen0
Copy link
Copy Markdown
Collaborator

@spalen0 spalen0 commented Mar 12, 2026

Summary

  • Add message_thread_id support to send_telegram_message() for routing protocols to topics within a single forum-style Telegram group
  • Configured via TELEGRAM_CHAT_ID_TOPICS and TELEGRAM_TOPIC_ID_{PROTOCOL} env vars; topics always use the default bot
  • Fully backwards compatible — protocols without a topic ID keep using legacy per-protocol chat routing
  • Fix pre-existing test bugs (missing LOG_LEVEL, wrong mock target)

Closes #162

Test plan

  • All 39 existing + new tests pass
  • Create Telegram supergroup with topics enabled
  • Set TELEGRAM_CHAT_ID_TOPICS and TELEGRAM_TOPIC_ID_* env vars
  • Verify messages route to correct topics
  • Verify legacy per-protocol routing still works without topic ID set

🤖 Generated with Claude Code

spalen0 and others added 3 commits March 12, 2026 22:33
Add message_thread_id support to send_telegram_message so protocols
can be routed to topics within a single forum-style group instead of
separate chats. Configured via TELEGRAM_CHAT_ID_TOPICS and
TELEGRAM_TOPIC_ID_{PROTOCOL} env vars. Backwards compatible — protocols
without a topic ID keep using legacy per-protocol chat routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add all TELEGRAM_TOPIC_ID_* and TELEGRAM_CHAT_ID_TOPICS env vars to
_run-monitoring.yml so forum-style topic routing works in GitHub Actions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@spalen0 spalen0 marked this pull request as ready for review March 31, 2026 09:57
Topic IDs and the topics chat ID are non-sensitive configuration.
Moving them from secrets to vars.* makes them visible in the GitHub UI
and easier to debug in workflow logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@spalen0 spalen0 merged commit 30e13b0 into main Mar 31, 2026
2 checks passed
@spalen0 spalen0 deleted the topics branch March 31, 2026 10:29
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.

Telegram topics

1 participant