fix(gateway): mark final voice reply as notify-worthy so Telegram delivers it audibly

In Telegram "important" notifications mode (default), TelegramPlatformAdapter
sets ``disable_notification=True`` on every send unless metadata carries
``notify=True``.  GatewayRunner._send_voice_reply already passes thread
metadata through to ``adapter.send_voice``, but never marks the final
auto-TTS voice reply as notify-worthy — so users with the default mode get
the final voice note delivered silently with no push notification.

Mirror the final-text path in gateway/platforms/base.py (the existing
text-response final send already adds ``metadata["notify"] = True``).

Issue #27970 Bug 2.  Bug 1 (MP3 vs. native OGG voice-note) is being
addressed by existing PRs #20182 / #20878 — this PR is intentionally
scoped to the silent-delivery bug only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
briandevans
2026-05-18 22:25:15 -07:00
committed by Teknium
co-authored by Claude Opus 4.7
parent ba2572e54c
commit d69f0c1a99
3 changed files with 132 additions and 2 deletions
+3
View File
@@ -463,6 +463,9 @@ class TestSendVoiceReply:
"telegram_dm_topic_reply_fallback": True,
"direct_messages_topic_id": "20197",
"telegram_reply_to_message_id": "462",
# Final voice reply is notify-worthy (issue #27970 Bug 2):
# mirrors the final-text path in gateway/platforms/base.py.
"notify": True,
}
@pytest.mark.asyncio