Fix forwarding messages to channels (#705)

This commit is contained in:
Alex Root Junior 2018-03-18 18:23:10 +02:00 committed by Lonami
parent d379b26339
commit 986ddbe600

View File

@ -846,7 +846,7 @@ class TelegramClient(TelegramBareClient):
for update in result.updates:
if isinstance(update, UpdateMessageID):
random_to_id[update.random_id] = update.id
elif isinstance(update, UpdateNewMessage):
elif isinstance(update, (UpdateNewMessage, UpdateNewChannelMessage)):
id_to_message[update.message.id] = update.message
return [id_to_message[random_to_id[rnd]] for rnd in req.random_id]