mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix another crash for return value when sending albums
This commit is contained in:
parent
02d0cbcfab
commit
a46ce053f1
|
@ -135,7 +135,11 @@ class MessageParseMethods:
|
||||||
# Pinning a message with `updatePinnedMessage` seems to
|
# Pinning a message with `updatePinnedMessage` seems to
|
||||||
# always produce a service message we can't map so return
|
# always produce a service message we can't map so return
|
||||||
# it directly.
|
# it directly.
|
||||||
if hasattr(request, 'random_id'):
|
#
|
||||||
|
# It could also be a list (e.g. when sending albums).
|
||||||
|
#
|
||||||
|
# TODO this method is getting messier and messier as time goes on
|
||||||
|
if hasattr(request, 'random_id') or utils.is_list_like(request):
|
||||||
id_to_message[update.message.id] = update.message
|
id_to_message[update.message.id] = update.message
|
||||||
else:
|
else:
|
||||||
return update.message
|
return update.message
|
||||||
|
|
Loading…
Reference in New Issue
Block a user