Skip to content

fix(orchestrator): route General topic in forum groups#110

Merged
RichardAtCT merged 1 commit intoRichardAtCT:mainfrom
F1orian:fix/general-topic-routing
Feb 26, 2026
Merged

fix(orchestrator): route General topic in forum groups#110
RichardAtCT merged 1 commit intoRichardAtCT:mainfrom
F1orian:fix/general-topic-routing

Conversation

@F1orian
Copy link
Copy Markdown
Contributor

@F1orian F1orian commented Feb 25, 2026

Summary

  • Telegram omits message_thread_id for messages in the built-in General topic of forum supergroups
  • _extract_message_thread_id returns None, so the routing guard rejects these messages
  • This patch defaults to thread ID 1 (Telegram's canonical General topic ID) when the chat is a forum group and no thread ID is present

Closes #109

Test plan

  • Send a message in the General topic of a forum supergroup with PROJECT_THREADS_MODE=group
  • Verify the message is routed to the project mapped to thread ID 1
  • Verify non-forum chats are unaffected (still return None)
  • Verify named topics still return their actual thread ID

🤖 Generated with Claude Code

Telegram omits `message_thread_id` for messages in the built-in General
topic of forum supergroups, causing `_extract_message_thread_id` to
return None. The routing guard then rejects these messages.

Default to thread ID 1 (Telegram's canonical General topic ID) when no
thread ID is present and the chat is a forum group.

Closes #109
@RichardAtCT RichardAtCT merged commit 22c0b9c into RichardAtCT:main Feb 26, 2026
RichardAtCT added a commit that referenced this pull request Feb 26, 2026
MagicMock auto-creates attributes on access, so getattr(mock, "is_forum", False)
returns a truthy MagicMock instead of False. The new forum detection in
_extract_message_thread_id incorrectly treated test mocks as forum chats.
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.

General topic messages ignored in group forum mode

2 participants