-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
Sessions navigation fix + DM thread display + DM thread delivery regression #3367
Description
Problem 1: Navigation
Clicking a session link in the Sessions tab navigates to the Main session instead of the clicked session.
Steps to reproduce:
- Open Sessions tab in Control UI
- Click on any non-main session (e.g., a Telegram DM topic)
- Expected: opens that session's chat
- Actual: opens Main session
Root cause: syncTabWithLocation() is called before applySettingsFromUrl(), overwriting the URL ?session= param with the old localStorage value.
Problem 2: Display
Telegram DM topic sessions all appear with the same display name — impossible to distinguish between them.
Problem 3: DM Thread Delivery (regression)
After commit 9154971 (fix(telegram): ignore message_thread_id for non-forum group sessions), bot replies in DM threads go to General instead of the originating thread.
Steps to reproduce:
- Enable Topics in a DM with the bot (requires Telegram Premium)
- Send a message in a DM thread/topic
- Bot replies in General instead of the thread
Root cause: resolveTelegramForumThreadId() returns undefined when is_forum is false. Telegram Bot API never sets is_forum=true for private chats (only supergroups). The returned context.resolvedThreadId is used by bot-message-dispatch.ts for draft streaming, typing indicators, and reply delivery — all become undefined for DM threads.
Fix
PR #3368 addresses all three issues:
- Call
applySettingsFromUrl()beforesyncTabWithLocation() - Set
ThreadLabelfor DM topic sessions - Introduce
effectiveThreadId = isGroup ? resolvedThreadId : messageThreadIdfor correct outbound delivery