Move message.out patching in self-chat to Message

May fix #1684.
This commit is contained in:
Lonami Exo
2021-03-14 11:16:59 +01:00
parent eba95ebd07
commit bdc324760d
2 changed files with 6 additions and 6 deletions

View File

@@ -269,6 +269,12 @@ class Message(ChatGetter, SenderGetter, TLObject):
known entities.
"""
self._client = client
# Make messages sent to ourselves outgoing unless they're forwarded.
# This makes it consistent with official client's appearance.
if self.peer_id == types.PeerUser(client._self_id) and not self.fwd_from:
self.out = True
cache = client._entity_cache
self._sender, self._input_sender = utils._get_entity_pair(