mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-03 10:45:52 +03:00
Fix ._pop_request_of_type failing on not-found requests
This commit is contained in:
parent
7bb7cb039f
commit
bff2e6981e
|
@ -244,7 +244,7 @@ class MtProtoSender:
|
|||
the given type, or returns None if it's not found/doesn't match.
|
||||
"""
|
||||
message = self._pending_receive.get(msg_id, None)
|
||||
if isinstance(message.request, t):
|
||||
if message and isinstance(message.request, t):
|
||||
return self._pending_receive.pop(msg_id).request
|
||||
|
||||
def _clear_all_pending(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user