fix(telegram): handle channel post updates#28531
Merged
Merged
Conversation
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-attribute |
19 |
unresolved-import |
1 |
First entries
tests/gateway/test_telegram_channel_posts.py:33: [unresolved-attribute] unresolved-attribute: Unresolved attribute `CommandHandler` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:32: [unresolved-attribute] unresolved-attribute: Unresolved attribute `Application` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:177: [unresolved-attribute] unresolved-attribute: Attribute `args` is not defined on `None` in union `_Call | None`
tests/gateway/test_telegram_channel_posts.py:36: [unresolved-attribute] unresolved-attribute: Unresolved attribute `ContextTypes` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:49: [unresolved-attribute] unresolved-attribute: Unresolved attribute `HTTPXRequest` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:26: [unresolved-attribute] unresolved-attribute: Unresolved attribute `Message` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:16: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/gateway/test_telegram_channel_posts.py:35: [unresolved-attribute] unresolved-attribute: Unresolved attribute `MessageHandler` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:29: [unresolved-attribute] unresolved-attribute: Unresolved attribute `LinkPreviewOptions` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:41: [unresolved-attribute] unresolved-attribute: Unresolved attribute `ChatType` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:52: [unresolved-attribute] unresolved-attribute: Unresolved attribute `constants` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:27: [unresolved-attribute] unresolved-attribute: Unresolved attribute `InlineKeyboardButton` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:37: [unresolved-attribute] unresolved-attribute: Unresolved attribute `filters` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:24: [unresolved-attribute] unresolved-attribute: Unresolved attribute `Update` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:28: [unresolved-attribute] unresolved-attribute: Unresolved attribute `InlineKeyboardMarkup` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:25: [unresolved-attribute] unresolved-attribute: Unresolved attribute `Bot` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:53: [unresolved-attribute] unresolved-attribute: Unresolved attribute `request` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:34: [unresolved-attribute] unresolved-attribute: Unresolved attribute `CallbackQueryHandler` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:51: [unresolved-attribute] unresolved-attribute: Unresolved attribute `ext` on type `ModuleType`
tests/gateway/test_telegram_channel_posts.py:40: [unresolved-attribute] unresolved-attribute: Unresolved attribute `ParseMode` on type `ModuleType`
✅ Fixed issues: none
Unchanged: 4680 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
2 tasks
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.
Salvage of #25327 (@brndnsvr). Routes Telegram handlers through
effective_messagesochannel_postupdates build gateway events instead of being silently ignored. Preserves channel identity for channel posts withoutfrom_userso operators can allowlist by chat id.Conflict resolution: combined with #28503 (#27014 forum-commands) — both add new methods on TelegramAdapter; kept both.
Authorship preserved across 2 commits via cherry-pick. 3/3 channel-post tests passing. Follow-up commit stubs auth in the test fixture (channel posts have
from_user=Noneand were getting rejected by #28494's fail-closed gate).