From b865512c68d831338558897c18101cd1b6b146a2 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:06:51 +0100 Subject: [PATCH] Add the field has_media_spoiler to the class Message --- pyrogram/types/messages_and_media/message.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index ada07e5a..18e6d7f7 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -147,6 +147,9 @@ class Message(Object, Update): has_protected_content (``bool``, *optional*): True, if the message can't be forwarded. + has_media_spoiler (``bool``, *optional*): + True, if the message media is covered by a spoiler animation. + text (``str``, *optional*): For text messages, the actual UTF-8 text of the message, 0-4096 characters. If the message contains entities (bold, italic, ...) you can access *text.markdown* or @@ -367,6 +370,7 @@ class Message(Object, Update): media_group_id: str = None, author_signature: str = None, has_protected_content: bool = None, + has_media_spoiler: bool = None, text: Str = None, entities: List["types.MessageEntity"] = None, caption_entities: List["types.MessageEntity"] = None, @@ -453,6 +457,7 @@ class Message(Object, Update): self.media_group_id = media_group_id self.author_signature = author_signature self.has_protected_content = has_protected_content + self.has_media_spoiler = has_media_spoiler self.text = text self.entities = entities self.caption_entities = caption_entities @@ -884,6 +889,7 @@ class Message(Object, Update): ), author_signature=message.post_author, has_protected_content=message.noforwards, + has_media_spoiler=media and media.spoiler, forward_from=forward_from, forward_sender_name=forward_sender_name, forward_from_chat=forward_from_chat,