You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #31075 and #31071, not a duplicate. This patches the current plugins/platforms/telegram/adapter.py, uses inline URLs, and adds event-path, idempotence, and surrogate-boundary guards; #31075 patches the older gateway path and emits Markdown links.
Thanks for porting this to the current bundled Telegram adapter. The reported gap is present on current main: plugins/platforms/telegram/adapter.py:9668 creates inbound events from visible message.text alone, while media paths reset captions from raw text at plugins/platforms/telegram/adapter.py:8952 and :8967.
The PR addresses the current ingress layer: _expand_link_entities handles text_link URLs and UTF-16 offsets (plugins/platforms/telegram/adapter.py:8183-8239 in fa3a0ed74744), the shared builder uses it (:9726), and both caption overrides use it (:9010, :9025). The builder is used by normal text, commands, observed messages, and media on main (plugins/platforms/telegram/adapter.py:8494, :8690, :8712, :8950, :8963). No core tool, configuration, or environment-variable surface is added.
Salvaged onto current main in #93346 (clean cherry-pick — your commit and authorship preserved), since this branch predates the adapter's move to plugins/platforms/telegram/. Thanks @DreamyMoonMouse! Leaving both open for maintainer review.
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
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.
Summary
text_linkentities so the model receives their hidden URLsTests
scripts/run_tests.sh tests/gateway/test_telegram_text_link_expansion.py tests/gateway/test_telegram_documents.py tests/gateway/test_telegram_group_gating.py tests/gateway/test_telegram_reply_quote.py tests/gateway/test_telegram_rich_messages.py(80 passed)python -m py_compile plugins/platforms/telegram/adapter.py tests/gateway/test_telegram_text_link_expansion.pygit diff --check