Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adityashaw2
Copy link
Contributor

Summary

Adds reply-chain detection for Telegram groups. When a user replies to a bot message in a group chat, the bot now treats it as an implicit mention, bypassing the mention requirement.

Changes

  • Added bot ID tracking in TelegramContext
  • Check if reply target is from the bot (isReplyToBot)
  • Bypass mention requirement when replying to bot messages (shouldBypassForReplyChain)
  • Include reply-chain detection in ACK reaction logic

Behavior

Before: In groups with requireMention: true, users had to explicitly @mention the bot even when replying to bot messages.

After: Replying to a bot message now works without explicit @mention, creating a natural conversation thread.

Testing

Tested in Telegram group chats with mention requirement enabled. Reply chains now work as expected.

Fixes conversation flow for threaded discussions in groups.

@steipete steipete self-assigned this Jan 16, 2026
@steipete
Copy link
Contributor

  • Medium: debug console.error left in production path; this will spam stderr for every reply. Please gate behind shouldLogVerbose()/logVerbose or remove. Path: src/telegram/bot.ts (deliverReplies, [DEBUG] telegram deliverReplies...).

fixing...

@steipete
Copy link
Contributor

It’s 2729 commits behind .... xD

@steipete steipete force-pushed the feature/telegram-reply-chain-detection branch from fd5b817 to a196ec9 Compare January 16, 2026 21:24
@steipete steipete merged commit e9d6869 into openclaw:main Jan 16, 2026
21 of 22 checks passed
@steipete
Copy link
Contributor

Landed via temp rebase onto main (squashed).

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: a196ec9
  • Merge commit: e9d6869

Thanks @adityashaw2!

TSavo pushed a commit to TSavo/clawdbot that referenced this pull request Jan 18, 2026
…enclaw#1038)

* Telegram: add reply-chain detection to bypass mention requirement

* fix: allow telegram reply-chain mention bypass (openclaw#1038) (thanks @adityashaw2)

---------

Co-authored-by: Aditya Shaw <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
rsneh pushed a commit to rsneh/clawdbot that referenced this pull request Jan 21, 2026
…enclaw#1038)

* Telegram: add reply-chain detection to bypass mention requirement

* fix: allow telegram reply-chain mention bypass (openclaw#1038) (thanks @adityashaw2)

---------

Co-authored-by: Aditya Shaw <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
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.

2 participants