From aedade2ff246a62237f7177fc3b56afee4518f79 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Sun, 1 Jan 2023 22:53:36 +0700 Subject: [PATCH] Pyrogram: add message_thread_id parameter to send_chat_action Signed-off-by: wulan17 --- pyrogram/methods/messages/send_chat_action.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyrogram/methods/messages/send_chat_action.py b/pyrogram/methods/messages/send_chat_action.py index 44b16628..50372d72 100644 --- a/pyrogram/methods/messages/send_chat_action.py +++ b/pyrogram/methods/messages/send_chat_action.py @@ -26,7 +26,8 @@ class SendChatAction: async def send_chat_action( self: "pyrogram.Client", chat_id: Union[int, str], - action: "enums.ChatAction" + action: "enums.ChatAction", + message_thread_id: int = None ) -> bool: """Tell the other party that something is happening on your side. @@ -41,6 +42,10 @@ class SendChatAction: action (:obj:`~pyrogram.enums.ChatAction`): Type of action to broadcast. + message_thread_id (```int```): + Unique identifier for the target message thread (topic) of the forum. + for forum supergroups only. + Returns: ``bool``: On success, True is returned. @@ -75,6 +80,7 @@ class SendChatAction: return await self.invoke( raw.functions.messages.SetTyping( peer=await self.resolve_peer(chat_id), - action=action + action=action, + top_msg_id=message_thread_id ) )