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,9 +138,8 @@ class NewMessage(EventBuilder):
|
|||||||
# Make messages sent to ourselves outgoing unless they're forwarded.
|
# Make messages sent to ourselves outgoing unless they're forwarded.
|
||||||
# This makes it consistent with official client's appearance.
|
# This makes it consistent with official client's appearance.
|
||||||
ori = event.message
|
ori = event.message
|
||||||
if isinstance(ori.peer_id, types.PeerUser):
|
if ori.peer_id == types.PeerUser(self_id) and not ori.fwd_from:
|
||||||
if ori.from_id == ori.peer_id and not ori.fwd_from:
|
event.message.out = True
|
||||||
event.message.out = True
|
|
||||||
|
|
||||||
return event
|
return event
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user