From 63db641f59cda823c562da755bfdb3cd8b44ba68 Mon Sep 17 00:00:00 2001 From: shriMADhav U k Date: Tue, 3 Sep 2024 18:08:30 +0200 Subject: [PATCH] Try to return the service message (when applicable) in the set_chat_photo - Documentation Fixes Signed-off-by: wulan17 --- pyrogram/types/user_and_chats/chat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index 35d819e9..df97fca5 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -774,7 +774,7 @@ class Chat(Object): emoji_background: Union[int, List[int]] = None, video: Union[str, BinaryIO] = None, video_start_ts: float = None, - ) -> bool: + ) -> Union["types.Message", bool]: """Bound method *set_photo* of :obj:`~pyrogram.types.Chat`. Use as a shortcut for: @@ -825,7 +825,8 @@ class Chat(Object): The timestamp in seconds of the video frame to use as photo profile preview. Returns: - ``bool``: True on success. + :obj:`~pyrogram.types.Message` | ``bool``: On success, a service message will be returned (when applicable), + otherwise, in case a message object couldn't be returned, True is returned. Raises: RPCError: In case of a Telegram RPC error.