mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Fix patching of message.out for self-chat
This commit is contained in:
parent
53920a1568
commit
e24c49f5be
|
@ -138,9 +138,8 @@ class NewMessage(EventBuilder):
|
|||
# Make messages sent to ourselves outgoing unless they're forwarded.
|
||||
# This makes it consistent with official client's appearance.
|
||||
ori = event.message
|
||||
if isinstance(ori.peer_id, types.PeerUser):
|
||||
if ori.from_id == ori.peer_id and not ori.fwd_from:
|
||||
event.message.out = True
|
||||
if ori.peer_id == types.PeerUser(self_id) and not ori.fwd_from:
|
||||
event.message.out = True
|
||||
|
||||
return event
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user