@@ -154,8 +154,8 @@ class Chat(Object):
154154 Available reactions in the chat.
155155 Returned only in :meth:`~pyrogram.Client.get_chat`.
156156
157- color (``int` `, *optional*)
158- Chat color.
157+ color (:obj:`~pyrogram.enums.ProfileColor `, *optional*)
158+ Chat reply color.
159159
160160 background_emoji_id (``int``, *optional*)
161161 Chat background emoji id.
@@ -200,7 +200,7 @@ def __init__(
200200 linked_chat : "types.Chat" = None ,
201201 send_as_chat : "types.Chat" = None ,
202202 available_reactions : Optional ["types.ChatReactions" ] = None ,
203- color : int = None ,
203+ color : "enums.ProfileColor" = None ,
204204 background_emoji_id : int = None
205205 ):
206206 super ().__init__ (client )
@@ -262,7 +262,7 @@ def _parse_user_chat(client, user: raw.types.User) -> "Chat":
262262 photo = types .ChatPhoto ._parse (client , user .photo , peer_id , user .access_hash ),
263263 restrictions = types .List ([types .Restriction ._parse (r ) for r in user .restriction_reason ]) or None ,
264264 dc_id = getattr (getattr (user , "photo" , None ), "dc_id" , None ),
265- color = getattr (user , "color" , None ),
265+ color = enums . ProfileColor ( user . color ) if getattr (user , "color" , None ) else None ,
266266 background_emoji_id = getattr (user , "background_emoji_id" , None ),
267267 client = client
268268 )
@@ -318,7 +318,7 @@ def _parse_channel_chat(client, channel: raw.types.Channel) -> "Chat":
318318 members_count = getattr (channel , "participants_count" , None ),
319319 dc_id = getattr (getattr (channel , "photo" , None ), "dc_id" , None ),
320320 has_protected_content = getattr (channel , "noforwards" , None ),
321- color = getattr (channel , "color" , None ),
321+ color = enums . ProfileColor ( channel . color ) if getattr (channel , "color" , None ) else None ,
322322 background_emoji_id = getattr (channel , "background_emoji_id" , None ),
323323 client = client
324324 )
0 commit comments