mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Prevent KeyError in forward_messages
This commit is contained in:
@@ -115,7 +115,7 @@ class MessageParseMethods(UserMethods):
|
||||
for x in
|
||||
itertools.chain(result.users, result.chats)}
|
||||
else:
|
||||
return
|
||||
return None
|
||||
|
||||
found = None
|
||||
for update in updates:
|
||||
@@ -141,5 +141,7 @@ class MessageParseMethods(UserMethods):
|
||||
if found:
|
||||
found._finish_init(self, entities, input_chat)
|
||||
return found
|
||||
else:
|
||||
return None # explicit is better than implicit
|
||||
|
||||
# endregion
|
||||
|
Reference in New Issue
Block a user