-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Summary
When a user sends a message via Telegram, there is no immediate visual feedback that the agent has received and is processing it. The only indicator is the typing action (sendChatAction), which is subtle and easily missed.
Proposed Behavior
Implement Telegram setMessageReaction API to provide emoji-based lifecycle feedback on the user's message, similar to how OpenClaw handles this:
| Phase | Emoji | When |
|---|---|---|
| Queued | ⏳ | Immediately on message receipt |
| Thinking | 🤔 | When LLM call starts |
| Tool Use | ⚙️ | When executing a tool |
| Done | ✅ | After successful response |
| Error | ❌ | On failure |
Implementation Details
The infrastructure is already in place:
LifecycleReactionstruct andAgentPhaseenum exist intypes.rssend_reaction()trait method is defined onChannelAdapterwith a default no-opALLOWED_REACTION_EMOJIanddefault_phase_emoji()are ready to use
Changes needed:
1. crates/openfang-channels/src/telegram.rs
- Add
api_set_reaction()method calling Telegram Bot APIsetMessageReaction - Implement
send_reaction()on theChannelAdaptertrait forTelegramAdapter
2. crates/openfang-channels/src/bridge.rs
- In
dispatch_message(), send ⏳ reaction immediately after receiving a message - Update to ✅ on success or ❌ on error
Example setMessageReaction API call:
POST /bot{token}/setMessageReaction
{
"chat_id": 12345,
"message_id": 42,
"reaction": [{"type": "emoji", "emoji": "⏳"}]
}Why
- Users currently have no way to know if the bot received their message until the full response arrives (which can take 10-30s)
- This matches the UX pattern established by OpenClaw and other modern bot frameworks
- The Telegram Bot API has supported
setMessageReactionsince API v7.0
Notes
- Reactions should be best-effort (fire-and-forget, don't block on failure)
- Only works in private chats and groups where the bot has appropriate permissions
- Consider making this configurable via channel config (e.g.
status_reactions = true)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels