mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-17 18:46:40 +00:00
Stop using input version on events to just get the ID
This commit is contained in:
parent
93b5909be5
commit
414fec91f1
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user