From db63b5e39a539456f9167c12a13f45202d7f29a1 Mon Sep 17 00:00:00 2001 From: 88ee55 <88ee55@gmail.com> Date: Fri, 13 Oct 2017 13:53:36 +0500 Subject: [PATCH] Fix .send_message not expecting UpdateNewChannelMessage (#331) --- telethon/telegram_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index ca24f5e7..c9032b6f 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -47,7 +47,7 @@ from .tl.types import ( InputMediaUploadedDocument, InputMediaUploadedPhoto, InputPeerEmpty, Message, MessageMediaContact, MessageMediaDocument, MessageMediaPhoto, InputUserSelf, UserProfilePhoto, ChatPhoto, UpdateMessageID, - UpdateNewMessage, UpdateShortSentMessage, + UpdateNewChannelMessage, UpdateNewMessage, UpdateShortSentMessage, PeerUser, InputPeerUser, InputPeerChat, InputPeerChannel) from .tl.types.messages import DialogsSlice @@ -359,7 +359,7 @@ class TelegramClient(TelegramBareClient): break for update in result.updates: - if isinstance(update, UpdateNewMessage): + if isinstance(update, (UpdateNewChannelMessage, UpdateNewMessage)): if update.message.id == msg_id: return update.message