@@ -316,6 +316,7 @@ def __init__(
316316 from_scheduled : bool = None ,
317317 media : str = None ,
318318 edit_date : int = None ,
319+ edit_hide : bool = False ,
319320 media_group_id : str = None ,
320321 author_signature : str = None ,
321322 has_protected_content : bool = None ,
@@ -388,6 +389,7 @@ def __init__(
388389 self .from_scheduled = from_scheduled
389390 self .media = media
390391 self .edit_date = edit_date
392+ self .edit_hide = edit_hide
391393 self .media_group_id = media_group_id
392394 self .author_signature = author_signature
393395 self .has_protected_content = has_protected_content
@@ -674,6 +676,14 @@ async def _parse(
674676 video_attributes = attributes .get (raw .types .DocumentAttributeVideo , None )
675677 animation = types .Animation ._parse (client , doc , video_attributes , file_name )
676678 media_type = "animation"
679+ elif raw .types .DocumentAttributeSticker in attributes :
680+ sticker = await types .Sticker ._parse (
681+ client , doc ,
682+ attributes .get (raw .types .DocumentAttributeImageSize , None ),
683+ attributes [raw .types .DocumentAttributeSticker ],
684+ file_name
685+ )
686+ media_type = "sticker"
677687 elif raw .types .DocumentAttributeVideo in attributes :
678688 video_attributes = attributes [raw .types .DocumentAttributeVideo ]
679689
@@ -683,14 +693,6 @@ async def _parse(
683693 else :
684694 video = types .Video ._parse (client , doc , video_attributes , file_name , media .ttl_seconds )
685695 media_type = "video"
686- elif raw .types .DocumentAttributeSticker in attributes :
687- sticker = await types .Sticker ._parse (
688- client , doc ,
689- attributes .get (raw .types .DocumentAttributeImageSize , None ),
690- attributes [raw .types .DocumentAttributeSticker ],
691- file_name
692- )
693- media_type = "sticker"
694696 else :
695697 document = types .Document ._parse (client , doc , file_name )
696698 media_type = "document"
@@ -768,6 +770,7 @@ async def _parse(
768770 from_scheduled = message .from_scheduled ,
769771 media = media_type ,
770772 edit_date = message .edit_date ,
773+ edit_hide = message .edit_hide ,
771774 media_group_id = message .grouped_id ,
772775 photo = photo ,
773776 location = location ,
0 commit comments