Let sender = chat for messages from channels

This commit is contained in:
Lonami Exo
2018-09-06 10:33:56 +02:00
parent ae085f30a8
commit 4e5b8c9c34
2 changed files with 7 additions and 3 deletions

View File

@@ -185,6 +185,10 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
else:
self._chat_peer = to_id
if post and not from_id and self._chat_peer:
# If the message comes from a Channel, let the sender be it
self._sender_id = utils.get_peer_id(self._chat_peer)
self._broadcast = post
self._chat = None
self._input_chat = None