Update message.py

This commit is contained in:
penn5 2022-01-04 09:02:39 +00:00 committed by GitHub
parent 768144fab4
commit aa29cddb63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,7 +415,6 @@ class Message(ChatGetter, SenderGetter):
# ...or... # ...or...
# incoming messages in private conversations no longer have from_id # incoming messages in private conversations no longer have from_id
# (layer 119+), but the sender can only be the chat we're in. # (layer 119+), but the sender can only be the chat we're in.
print("a", message.peer_id, message.out, isinstance(message.peer_id, _tl.PeerUser))
if message.post or (not message.out and isinstance(message.peer_id, _tl.PeerUser)): if message.post or (not message.out and isinstance(message.peer_id, _tl.PeerUser)):
sender_id = message.peer_id sender_id = message.peer_id
if message.post: if message.post:
@ -425,7 +424,6 @@ class Message(ChatGetter, SenderGetter):
sender_id = _tl.PeerUser(client._session_state.user_id) sender_id = _tl.PeerUser(client._session_state.user_id)
else: else:
sender_id = message.peer_id sender_id = message.peer_id
print("b", sender_id)
# Note that these calls would reset the client # Note that these calls would reset the client
ChatGetter.__init__(self, message.peer_id, broadcast=message.post) ChatGetter.__init__(self, message.peer_id, broadcast=message.post)