mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
An user -> a user
This commit is contained in:
@@ -37,7 +37,7 @@ class ChatAction(EventBuilder):
|
||||
added_by=True,
|
||||
users=msg.from_id)
|
||||
elif isinstance(action, types.MessageActionChatAddUser):
|
||||
# If an user adds itself, it means they joined
|
||||
# If a user adds itself, it means they joined
|
||||
added_by = ([msg.from_id] == action.users) or msg.from_id
|
||||
event = cls.Event(msg,
|
||||
added_by=added_by,
|
||||
|
@@ -191,7 +191,7 @@ class NewMessage(EventBuilder):
|
||||
self.__dict__['_init'] = False
|
||||
if not message.out and isinstance(message.to_id, types.PeerUser):
|
||||
# Incoming message (e.g. from a bot) has to_id=us, and
|
||||
# from_id=bot (the actual "chat" from an user's perspective).
|
||||
# from_id=bot (the actual "chat" from a user's perspective).
|
||||
chat_peer = types.PeerUser(message.from_id)
|
||||
else:
|
||||
chat_peer = message.to_id
|
||||
|
@@ -7,7 +7,7 @@ from ..tl import types
|
||||
@name_inner_event
|
||||
class UserUpdate(EventBuilder):
|
||||
"""
|
||||
Represents an user update (gone online, offline, joined Telegram).
|
||||
Represents a user update (gone online, offline, joined Telegram).
|
||||
"""
|
||||
@classmethod
|
||||
def build(cls, update):
|
||||
@@ -22,7 +22,7 @@ class UserUpdate(EventBuilder):
|
||||
|
||||
class Event(EventCommon):
|
||||
"""
|
||||
Represents the event of an user status update (last seen, joined).
|
||||
Represents the event of a user status update (last seen, joined).
|
||||
|
||||
Members:
|
||||
online (`bool`, optional):
|
||||
|
Reference in New Issue
Block a user