File tree Expand file tree Collapse file tree
pyrogram/types/user_and_chats Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ class Chat(Object):
132132
133133 usernames (List of :obj:`~pyrogram.types.Username`, *optional*):
134134 The list of chat's collectible (and basic) usernames if availables.
135+
136+ full_name (``str``, *property*):
137+ Full name of the other party in a private chat, for private chats and bots.
135138 """
136139
137140 def __init__ (
@@ -200,6 +203,10 @@ def __init__(
200203 self .available_reactions = available_reactions
201204 self .usernames = usernames
202205
206+ @property
207+ def full_name (self ) -> str :
208+ return " " .join (filter (None , [self .first_name , self .last_name ])) or None
209+
203210 @staticmethod
204211 def _parse_user_chat (client , user : raw .types .User ) -> "Chat" :
205212 peer_id = user .id
Original file line number Diff line number Diff line change @@ -140,6 +140,9 @@ class User(Object, Update):
140140 The list of reasons why this bot might be unavailable to some users.
141141 This field is available only in case *is_restricted* is True.
142142
143+ full_name (``str``, *optional*):
144+ User's or bot's full name.
145+
143146 mention (``str``, *property*):
144147 Generate a text mention for this user.
145148 You can use ``user.mention()`` to mention the user using their first name (styled using html), or
@@ -208,6 +211,10 @@ def __init__(
208211 self .restrictions = restrictions
209212 self .usernames = usernames
210213
214+ @property
215+ def full_name (self ) -> str :
216+ return " " .join (filter (None , [self .first_name , self .last_name ])) or None
217+
211218 @property
212219 def mention (self ):
213220 return Link (
You can’t perform that action at this time.
0 commit comments