mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Stop using input version on events to just get the ID
This commit is contained in:
@@ -272,8 +272,8 @@ class ChatAction(EventBuilder):
|
|||||||
"""
|
"""
|
||||||
Returns the marked signed ID of the first user, if any.
|
Returns the marked signed ID of the first user, if any.
|
||||||
"""
|
"""
|
||||||
if self.input_users:
|
if self._user_peers:
|
||||||
return utils.get_peer_id(self._input_users[0])
|
return utils.get_peer_id(self._user_peers[0])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def users(self):
|
def users(self):
|
||||||
@@ -325,5 +325,5 @@ class ChatAction(EventBuilder):
|
|||||||
"""
|
"""
|
||||||
Returns the marked signed ID of the users, if any.
|
Returns the marked signed ID of the users, if any.
|
||||||
"""
|
"""
|
||||||
if self.input_users:
|
if self._user_peers:
|
||||||
return [utils.get_peer_id(u) for u in self._input_users]
|
return [utils.get_peer_id(u) for u in self._user_peers]
|
||||||
|
@@ -263,8 +263,7 @@ class NewMessage(EventBuilder):
|
|||||||
"""
|
"""
|
||||||
Returns the marked sender integer ID, if present.
|
Returns the marked sender integer ID, if present.
|
||||||
"""
|
"""
|
||||||
if self.input_sender:
|
return self.message.from_id
|
||||||
return utils.get_peer_id(self._input_sender)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def text(self):
|
def text(self):
|
||||||
|
Reference in New Issue
Block a user