mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 21:24:35 +03:00
parent
eba95ebd07
commit
bdc324760d
|
@ -137,12 +137,6 @@ class NewMessage(EventBuilder):
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Make messages sent to ourselves outgoing unless they're forwarded.
|
|
||||||
# This makes it consistent with official client's appearance.
|
|
||||||
ori = event.message
|
|
||||||
if ori.peer_id == types.PeerUser(self_id) and not ori.fwd_from:
|
|
||||||
event.message.out = True
|
|
||||||
|
|
||||||
return event
|
return event
|
||||||
|
|
||||||
def filter(self, event):
|
def filter(self, event):
|
||||||
|
|
|
@ -269,6 +269,12 @@ class Message(ChatGetter, SenderGetter, TLObject):
|
||||||
known entities.
|
known entities.
|
||||||
"""
|
"""
|
||||||
self._client = client
|
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
|
cache = client._entity_cache
|
||||||
|
|
||||||
self._sender, self._input_sender = utils._get_entity_pair(
|
self._sender, self._input_sender = utils._get_entity_pair(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user