File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
pyrogram/types/user_and_chats Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -41,26 +41,31 @@ def __init__(
4141 * ,
4242 client : "pyrogram.Client" = None ,
4343 custom_emoji_id : int ,
44- until_date : Optional [datetime ] = None
44+ until_date : Optional [datetime ] = None ,
45+ _raw : "raw.base.EmojiStatus" = None ,
4546 ):
4647 super ().__init__ (client )
4748
4849 self .custom_emoji_id = custom_emoji_id
4950 self .until_date = until_date
51+ self ._raw = _raw
5052
5153 @staticmethod
5254 def _parse (client , emoji_status : "raw.base.EmojiStatus" ) -> Optional ["EmojiStatus" ]:
5355 if isinstance (emoji_status , raw .types .EmojiStatus ):
5456 return EmojiStatus (
5557 client = client ,
56- custom_emoji_id = emoji_status .document_id
58+ custom_emoji_id = emoji_status .document_id ,
59+ until_date = utils .timestamp_to_datetime (emoji_status .until ) if emoji_status .until else None ,
60+ _raw = emoji_status
5761 )
5862
59- if isinstance (emoji_status , raw .types .EmojiStatusUntil ):
63+ if isinstance (emoji_status , raw .types .EmojiStatusCollectible ):
6064 return EmojiStatus (
6165 client = client ,
6266 custom_emoji_id = emoji_status .document_id ,
63- until_date = utils .timestamp_to_datetime (emoji_status .until )
67+ until_date = utils .timestamp_to_datetime (emoji_status .until ) if emoji_status .until else None ,
68+ _raw = emoji_status
6469 )
6570
6671 return None
You can’t perform that action at this time.
0 commit comments