From a175b33d27aee9c9486f1eef87bffc08e950bf93 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Sun, 21 May 2023 00:33:49 +0700 Subject: [PATCH] PyroFork: Add protect_content and drop_author parameters to forward bound method Signed-off-by: wulan17 --- pyrogram/types/messages_and_media/message.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 7a3e1806..a4bbed99 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -3098,7 +3098,9 @@ class Message(Object, Update): chat_id: Union[int, str], message_thread_id: int = None, disable_notification: bool = None, - schedule_date: datetime = None + schedule_date: datetime = None, + protect_content: bool = None, + drop_author: bool = None ) -> Union["types.Message", List["types.Message"]]: """Bound method *forward* of :obj:`~pyrogram.types.Message`. @@ -3133,6 +3135,12 @@ class Message(Object, Update): schedule_date (:py:obj:`~datetime.datetime`, *optional*): Date when the message will be automatically sent. + protect_content (``bool``, *optional*): + Protects the contents of the sent message from forwarding and saving. + + drop_author (``bool``, *optional*): + Forwards messages without quoting the original author + Returns: On success, the forwarded Message is returned. @@ -3145,7 +3153,9 @@ class Message(Object, Update): message_ids=self.id, message_thread_id=message_thread_id, disable_notification=disable_notification, - schedule_date=schedule_date + schedule_date=schedule_date, + protect_content=protect_content, + drop_author=drop_author ) async def copy(