feat(telegram): agent-callable message reaction (message action=react) (#1407)

Adds a "react" action to the message tool so an agent can set an emoji
reaction on an existing message (e.g. mark its own status post 👍 once
fully paid). Mirrors the ChannelEditor wiring: ReactionSetter capability
-> Manager.ReactToMessage -> telegram Channel.ReactToMessage (validates
against Telegram's supported reaction set; ✅/❌ are rejected).

Co-authored-by: skensel <skensel@MacBook-Pro-skensel.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-07-09 16:55:54 +07:00
1 parent fb28b72b27
commit 2b7bfec504
5 files changed
+119 -12

No files matched your search

+3
View File
@@ -721,6 +721,9 @@ func runGateway() {
if ce, ok := t.(tools.ChannelEditorAware); ok {
ce.SetChannelEditor(channelMgr.EditChannelMessage)
}
if rs, ok := t.(tools.ReactionSetterAware); ok {
rs.SetReactionSetter(channelMgr.ReactToMessage)
}
if tr, ok := t.(tools.TopicResolverAware); ok && pgStores != nil && pgStores.Contacts != nil {
contacts := pgStores.Contacts
tr.SetTopicResolver(func(ctx context.Context, channel, chatID, topicName string) (string, bool) {