diff --git a/telethon/events/chataction.py b/telethon/events/chataction.py index 6649957f..cf6faae5 100644 --- a/telethon/events/chataction.py +++ b/telethon/events/chataction.py @@ -272,8 +272,8 @@ class ChatAction(EventBuilder): """ Returns the marked signed ID of the first user, if any. """ - if self.input_users: - return utils.get_peer_id(self._input_users[0]) + if self._user_peers: + return utils.get_peer_id(self._user_peers[0]) @property def users(self): @@ -325,5 +325,5 @@ class ChatAction(EventBuilder): """ Returns the marked signed ID of the users, if any. """ - if self.input_users: - return [utils.get_peer_id(u) for u in self._input_users] + if self._user_peers: + return [utils.get_peer_id(u) for u in self._user_peers] diff --git a/telethon/events/newmessage.py b/telethon/events/newmessage.py index d443909a..f6761485 100644 --- a/telethon/events/newmessage.py +++ b/telethon/events/newmessage.py @@ -263,8 +263,7 @@ class NewMessage(EventBuilder): """ Returns the marked sender integer ID, if present. """ - if self.input_sender: - return utils.get_peer_id(self._input_sender) + return self.message.from_id @property def text(self):