mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-28 13:54:13 +03:00
Fix _get_response_message for sendMedia(live location)
This commit is contained in:
parent
22e645e22f
commit
5f8032584b
|
@ -135,8 +135,13 @@ class MessageParseMethods:
|
||||||
|
|
||||||
elif (isinstance(update, types.UpdateEditMessage)
|
elif (isinstance(update, types.UpdateEditMessage)
|
||||||
and helpers._entity_type(request.peer) != helpers._EntityType.CHANNEL):
|
and helpers._entity_type(request.peer) != helpers._EntityType.CHANNEL):
|
||||||
if request.id == update.message.id:
|
update.message._finish_init(self, entities, input_chat)
|
||||||
update.message._finish_init(self, entities, input_chat)
|
|
||||||
|
# Live locations use `sendMedia` but Telegram responds with
|
||||||
|
# `updateEditMessage`, which means we won't have `id` field.
|
||||||
|
if hasattr(request, 'random_id'):
|
||||||
|
id_to_message[update.message.id] = update.message
|
||||||
|
elif request.id == update.message.id:
|
||||||
return update.message
|
return update.message
|
||||||
|
|
||||||
elif (isinstance(update, types.UpdateEditChannelMessage)
|
elif (isinstance(update, types.UpdateEditChannelMessage)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user