From b0a9d28bda7e1408b8355cc31f80af8e22e05d4e Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 30 Dec 2021 13:41:23 +0100 Subject: [PATCH] Add field Chat.available_reactions --- pyrogram/types/user_and_chats/chat.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index 4cee9640..6622c181 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -124,6 +124,10 @@ class Chat(Object): send_as_chat (:obj:`~pyrogram.types.Chat`, *optional*): The default "send_as" chat. Returned only in :meth:`~pyrogram.Client.get_chat`. + + available_reactions (List of ``str``, *optional*): + Available reactions in the chat. + Returned only in :meth:`~pyrogram.Client.get_chat`. """ def __init__( @@ -156,7 +160,8 @@ class Chat(Object): permissions: "types.ChatPermissions" = None, distance: int = None, linked_chat: "types.Chat" = None, - send_as_chat: "types.Chat" = None + send_as_chat: "types.Chat" = None, + available_reactions: List[str] = None ): super().__init__(client) @@ -187,6 +192,7 @@ class Chat(Object): self.distance = distance self.linked_chat = linked_chat self.send_as_chat = send_as_chat + self.available_reactions = available_reactions @staticmethod def _parse_user_chat(client, user: raw.types.User) -> "Chat": @@ -336,6 +342,8 @@ class Chat(Object): if isinstance(full_chat.exported_invite, raw.types.ChatInviteExported): parsed_chat.invite_link = full_chat.exported_invite.link + parsed_chat.available_reactions = full_chat.available_reactions or None + return parsed_chat @staticmethod