File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
pyrogram/types/user_and_chats Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -52,27 +52,16 @@ def __init__(
5252 @staticmethod
5353 def _parse (client , emoji_status : "raw.base.EmojiStatus" ) -> Optional ["EmojiStatus" ]:
5454 if isinstance (emoji_status , raw .types .EmojiStatus ):
55- return EmojiStatus (
56- client = client ,
57- custom_emoji_id = emoji_status .document_id
58- )
59-
60- if isinstance (emoji_status , raw .types .EmojiStatusUntil ):
6155 return EmojiStatus (
6256 client = client ,
6357 custom_emoji_id = emoji_status .document_id ,
64- until_date = utils .timestamp_to_datetime (emoji_status .until )
58+ until_date = utils .timestamp_to_datetime (emoji_status .until ) if emoji_status . until else None
6559 )
6660
6761 return None
6862
6963 def write (self ):
70- if self .until_date :
71- return raw .types .EmojiStatusUntil (
72- document_id = self .custom_emoji_id ,
73- until = utils .datetime_to_timestamp (self .until_date )
74- )
75-
7664 return raw .types .EmojiStatus (
77- document_id = self .custom_emoji_id
65+ document_id = self .custom_emoji_id ,
66+ until = utils .datetime_to_timestamp (self .until_date ) if self .until_date else None
7867 )
You can’t perform that action at this time.
0 commit comments