mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Fix patching of message.out for self-chat
This commit is contained in:
@@ -138,8 +138,7 @@ 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:
|
||||
if ori.peer_id == types.PeerUser(self_id) and not ori.fwd_from:
|
||||
event.message.out = True
|
||||
|
||||
return event
|
||||
|
Reference in New Issue
Block a user