Skip to content

fix(telegram): preserve @mentions and add bot-to-bot mention routing#202

Open
nvt-ak wants to merge 2 commits intonextlevelbuilder:mainfrom
nvt-ak:fix/telegram-bot-mention
Open

fix(telegram): preserve @mentions and add bot-to-bot mention routing#202
nvt-ak wants to merge 2 commits intonextlevelbuilder:mainfrom
nvt-ak:fix/telegram-bot-mention

Conversation

@nvt-ak
Copy link

@nvt-ak nvt-ak commented Mar 14, 2026

  • Protect @mentions (e.g. @vinaco_pm_bot) from italic regex in markdownToTelegramHTML so underscores in usernames are not mangled to @vinacopmbot
  • Add BotMentionChannel interface for channels with bot username (Telegram)
  • When a bot sends a message mentioning another bot, inject InboundMessage internally since Telegram does not deliver bot→bot messages to webhooks
  • Handle bot_mention in gateway consumer (delegate lane) to wake up mentioned bots

Made-with: Cursor

nvt-ak added 2 commits March 15, 2026 01:22
- Protect @mentions (e.g. @vinaco_pm_bot) from italic regex in markdownToTelegramHTML
  so underscores in usernames are not mangled to @vinacopmbot
- Add BotMentionChannel interface for channels with bot username (Telegram)
- When a bot sends a message mentioning another bot, inject InboundMessage internally
  since Telegram does not deliver bot→bot messages to webhooks
- Handle bot_mention in gateway consumer (delegate lane) to wake up mentioned bots

Made-with: Cursor
Session must be keyed by the mentioned bot's channel (telegram_techlead),
not the sender's channel (telegram_pm), so the bot can find its session.

Made-with: Cursor
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