@@ -36,14 +36,17 @@ class Chat(Object):
3636 Type of chat, can be either "private", "bot", "group", "supergroup" or "channel".
3737
3838 is_verified (``bool``, *optional*):
39- True, if this chat has been verified by Telegram. Supergroups and channels only.
39+ True, if this chat has been verified by Telegram. Supergroups, channels and bots only.
4040
4141 is_restricted (``bool``, *optional*):
42- True, if this chat has been restricted. Supergroups and channels only.
42+ True, if this chat has been restricted. Supergroups, channels and bots only.
4343 See *restriction_reason* for details.
4444
4545 is_scam (``bool``, *optional*):
46- True, if this chat has been flagged for scam. Supergroups and channels only.
46+ True, if this chat has been flagged for scam. Supergroups, channels and bots only.
47+
48+ is_support (``bool``):
49+ True, if this chat is part of the Telegram support team. Users and bots only.
4750
4851 title (``str``, *optional*):
4952 Title, for supergroups, channels and basic group chats.
@@ -92,8 +95,8 @@ class Chat(Object):
9295 """
9396
9497 __slots__ = [
95- "id" , "type" , "is_verified" , "is_restricted" , "is_scam" , "title " , "username " , "first_name " , "last_name " ,
96- "photo" , "description" , "invite_link" , "pinned_message" , "sticker_set_name" , "can_set_sticker_set" ,
98+ "id" , "type" , "is_verified" , "is_restricted" , "is_scam" , "is_support " , "title " , "username " , "first_name " ,
99+ "last_name" , " photo" , "description" , "invite_link" , "pinned_message" , "sticker_set_name" , "can_set_sticker_set" ,
97100 "members_count" , "restriction_reason" , "permissions"
98101 ]
99102
@@ -106,6 +109,7 @@ def __init__(
106109 is_verified : bool = None ,
107110 is_restricted : bool = None ,
108111 is_scam : bool = None ,
112+ is_support : bool = None ,
109113 title : str = None ,
110114 username : str = None ,
111115 first_name : str = None ,
@@ -127,6 +131,7 @@ def __init__(
127131 self .is_verified = is_verified
128132 self .is_restricted = is_restricted
129133 self .is_scam = is_scam
134+ self .is_support = is_support
130135 self .title = title
131136 self .username = username
132137 self .first_name = first_name
@@ -148,6 +153,10 @@ def _parse_user_chat(client, user: types.User) -> "Chat":
148153 return Chat (
149154 id = peer_id ,
150155 type = "bot" if user .bot else "private" ,
156+ is_verified = getattr (user , "verified" , None ),
157+ is_restricted = getattr (user , "restricted" , None ),
158+ is_scam = getattr (user , "scam" , None ),
159+ is_support = getattr (user , "support" , None ),
151160 username = user .username ,
152161 first_name = user .first_name ,
153162 last_name = user .last_name ,
0 commit comments