mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
parent
d7424ccb90
commit
5a17397fc7
|
@ -152,16 +152,8 @@ class Album(EventBuilder):
|
||||||
"""
|
"""
|
||||||
def __init__(self, messages):
|
def __init__(self, messages):
|
||||||
message = messages[0]
|
message = messages[0]
|
||||||
if not message.out and isinstance(message.peer_id, types.PeerUser):
|
super().__init__(chat_peer=message.peer_id,
|
||||||
# Incoming message (e.g. from a bot) has peer_id=us, and
|
|
||||||
# from_id=bot (the actual "chat" from a user's perspective).
|
|
||||||
chat_peer = message.from_id
|
|
||||||
else:
|
|
||||||
chat_peer = message.peer_id
|
|
||||||
|
|
||||||
super().__init__(chat_peer=chat_peer,
|
|
||||||
msg_id=message.id, broadcast=bool(message.post))
|
msg_id=message.id, broadcast=bool(message.post))
|
||||||
|
|
||||||
SenderGetter.__init__(self, message.sender_id)
|
SenderGetter.__init__(self, message.sender_id)
|
||||||
self.messages = messages
|
self.messages = messages
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user