mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Fix _get_response_message when integers are given #1151
This commit is contained in:
@@ -131,9 +131,10 @@ class MessageParseMethods(UserMethods):
|
|||||||
update.message._finish_init(self, entities, input_chat)
|
update.message._finish_init(self, entities, input_chat)
|
||||||
return update.message
|
return update.message
|
||||||
|
|
||||||
if not utils.is_list_like(request.random_id):
|
random_id = request if isinstance(request, int) else request.random_id
|
||||||
if request.random_id in random_to_id:
|
if not utils.is_list_like(random_id):
|
||||||
return id_to_message[random_to_id[request.random_id]]
|
if random_id in random_to_id:
|
||||||
|
return id_to_message[random_to_id[random_id]]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
@@ -144,6 +145,6 @@ class MessageParseMethods(UserMethods):
|
|||||||
# `random_to_id[rnd]` would `KeyError`.
|
# `random_to_id[rnd]` would `KeyError`.
|
||||||
return [id_to_message[random_to_id[rnd]]
|
return [id_to_message[random_to_id[rnd]]
|
||||||
if rnd in random_to_id else None
|
if rnd in random_to_id else None
|
||||||
for rnd in request.random_id]
|
for rnd in random_id]
|
||||||
|
|
||||||
# endregion
|
# endregion
|
||||||
|
Reference in New Issue
Block a user