fix(webhook): surface DM topic routing keys in cross-platform delivery metadata#33397
Open
liuhao1024 wants to merge 1 commit into
Open
fix(webhook): surface DM topic routing keys in cross-platform delivery metadata#33397liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
…y metadata When a webhook subscription targets a Telegram private DM with topics enabled, the adapter previously only passed thread_id in metadata. The Telegram adapter then demanded a reply anchor (telegram_reply_to_message_id) that webhooks cannot provide, causing every DM-topic delivery to fail silently. Now deliver_extra keys direct_messages_topic_id and telegram_reply_to_message_id are surfaced in the metadata dict alongside thread_id, allowing the Telegram adapter to route DM topic messages without requiring an in-session reply anchor. Fixes NousResearch#33375
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Surfaces
direct_messages_topic_idandtelegram_reply_to_message_idfromdeliver_extrainto the cross-platform delivery metadata dict in the webhook adapter.Related Issue
Fixes #33375
Type of Change
Changes Made
How to Test
pytest tests/ -q— all tests should passChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture and workflows — or N/ACode Intelligence
gateway/platforms/webhook.py:_deliver_cross_platform(callers: webhook route dispatch, cross-platform delivery handler)gateway/platforms/telegram.py:_thread_kwargs_for_sendalready handlesdirect_messages_topic_idas an opt-out from the reply anchor requirement;tools/send_message_tool.pyhas a similar gap tracked in Cron delivery to private DM topics broken after PR #22410 — send_message_tool.py missing three-mode routing #22773Checklist
deliver_extraconfigs without new keys are unaffected)