Skip to content

fix: normalize Telegram topic ids for inbound claim after resume#96

Open
kesslerio wants to merge 1 commit into
pwrdrvr:mainfrom
kesslerio:fix/telegram-topic-inbound-claim
Open

fix: normalize Telegram topic ids for inbound claim after resume#96
kesslerio wants to merge 1 commit into
pwrdrvr:mainfrom
kesslerio:fix/telegram-topic-inbound-claim

Conversation

@kesslerio
Copy link
Copy Markdown

What

  • rebuild Telegram topic conversation ids from conversationId + threadId before inbound-claim lookup
  • keep the topic binding shape aligned with the resume path
  • add a regression for resumed Telegram topics

Why

A resumed Telegram topic could get into a confusing state: /cas_status still showed an active binding, but plain messages in that same topic fell through with "the bound plugin did not handle this message."

The problem was narrower than it looked. The resume flow stores Telegram topics as chatId:topic:threadId, but the inbound path was still looking up the raw chat id from the event. That meant the binding existed, but the later inbound message did not hit it.

This patch only fixes that identity mismatch.

Tests

  • pnpm test src/controller.test.ts
  • pnpm typecheck
  • pnpm test

AI assistance

Codex drafted the patch and regression. I reviewed the diff, the repro, and the test results before opening the PR.

Fixes #94

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.

bug: resumed Telegram topics can quietly lose their CAS binding

2 participants