From 0e315a6f02e92bb22a1b566bbe42fab9ee94010c Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 10 Apr 2026 05:34:33 -0700 Subject: [PATCH] fix(telegram): use valid reaction emojis for processing completion (#7175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Telegram's Bot API only allows a specific set of emoji for bot reactions (the ReactionEmoji enum). ✅ (U+2705) and ❌ (U+274C) are not in that set, causing on_processing_complete reactions to silently fail with REACTION_INVALID (caught at debug log level). Replace with 👍 (U+1F44D) / 👎 (U+1F44E) which are always available in Telegram's allowed reaction list. The 👀 (eyes) reaction used by on_processing_start was already valid. Based on the fix by @ppdng in PR #6685. Fixes #6068 --- gateway/platforms/telegram.py | 2 +- tests/gateway/test_telegram_reactions.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gateway/platforms/telegram.py b/gateway/platforms/telegram.py index af447d565..8b4e43514 100644 --- a/gateway/platforms/telegram.py +++ b/gateway/platforms/telegram.py @@ -2802,5 +2802,5 @@ class TelegramAdapter(BasePlatformAdapter): await self._set_reaction( chat_id, message_id, - "\u2705" if outcome == ProcessingOutcome.SUCCESS else "\u274c", + "\U0001f44d" if outcome == ProcessingOutcome.SUCCESS else "\U0001f44e", ) diff --git a/tests/gateway/test_telegram_reactions.py b/tests/gateway/test_telegram_reactions.py index 98a75afbe..143161e9b 100644 --- a/tests/gateway/test_telegram_reactions.py +++ b/tests/gateway/test_telegram_reactions.py @@ -175,7 +175,7 @@ async def test_on_processing_start_handles_missing_ids(monkeypatch): @pytest.mark.asyncio async def test_on_processing_complete_success(monkeypatch): - """Successful processing should set check mark reaction.""" + """Successful processing should set thumbs-up reaction.""" monkeypatch.setenv("TELEGRAM_REACTIONS", "true") adapter = _make_adapter() event = _make_event() @@ -185,13 +185,13 @@ async def test_on_processing_complete_success(monkeypatch): adapter._bot.set_message_reaction.assert_awaited_once_with( chat_id=123, message_id=456, - reaction="\u2705", + reaction="\U0001f44d", ) @pytest.mark.asyncio async def test_on_processing_complete_failure(monkeypatch): - """Failed processing should set cross mark reaction.""" + """Failed processing should set thumbs-down reaction.""" monkeypatch.setenv("TELEGRAM_REACTIONS", "true") adapter = _make_adapter() event = _make_event() @@ -201,7 +201,7 @@ async def test_on_processing_complete_failure(monkeypatch): adapter._bot.set_message_reaction.assert_awaited_once_with( chat_id=123, message_id=456, - reaction="\u274c", + reaction="\U0001f44e", )