Skip to content

feat(telegram): react ⚡ to messages on receipt#398

Open
Abelonx wants to merge 1 commit intochenhg5:mainfrom
Abelonx:feat/telegram-message-reaction
Open

feat(telegram): react ⚡ to messages on receipt#398
Abelonx wants to merge 1 commit intochenhg5:mainfrom
Abelonx:feat/telegram-message-reaction

Conversation

@Abelonx
Copy link
Copy Markdown

@Abelonx Abelonx commented Apr 1, 2026

Summary

  • Add SetMessageReaction to the telegramBot interface
  • Add reactToMessage helper that calls setMessageReaction asynchronously (non-blocking)
  • Call it in handleMessage right after the reply context is built, so the bot reacts with ⚡ the moment a message arrives — giving the user immediate visual feedback that processing has started
  • Update stubTelegramBot in tests to satisfy the extended interface

Behavior

User sends message
    → bot immediately reacts with ⚡  (non-blocking goroutine)
    → processing continues as normal
    → bot replies when done

This matches the pattern shown by other Telegram bots (e.g. Alma in cc-connect) where a reaction signals "received & processing".

Test plan

  • go build ./platform/telegram/... passes
  • go test ./platform/telegram/... passes (all existing tests green)
  • Manual: send a message via Telegram → bot should react ⚡ within ~1s

When a user sends a message, the bot immediately reacts with ⚡ to
signal that the message has been received and is being processed.

Changes:
- Add SetMessageReaction to telegramBot interface
- Add reactToMessage helper that calls setMessageReaction asynchronously
- Call reactToMessage in handleMessage after building reply context
- Add setReactionCalls counter to stubTelegramBot in tests
Copy link
Copy Markdown
Owner

@chenhg5 chenhg5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice UX improvement for Telegram.

Review summary:

  • ✅ Non-blocking goroutine for reaction
  • ✅ Immediate visual feedback to users
  • ✅ Test stub updated
  • ✅ CI passes

Small but impactful feature for Telegram bot responsiveness.

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