From 6275a4003fef2cab30b99876095a2c434fd21697 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 16 Apr 2018 00:59:41 +0200 Subject: [PATCH] Add mime_type, file_name and date to Sticker objects --- compiler/api/source/pyrogram.tl | 2 +- pyrogram/client/message_parser.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/api/source/pyrogram.tl b/compiler/api/source/pyrogram.tl index 1e5ea31b..82815beb 100644 --- a/compiler/api/source/pyrogram.tl +++ b/compiler/api/source/pyrogram.tl @@ -19,4 +19,4 @@ pyrogram.venue#b0700013 flags:# location:Location title:string address:string fo pyrogram.userProfilePhotos#b0700014 total_count:int photos:Vector> = pyrogram.UserProfilePhotos; pyrogram.chatPhoto#b0700015 small_file_id:string big_file_id:string = pyrogram.ChatPhoto; pyrogram.chatMember#b0700016 flags:# user:User status:string until_date:flags.0?int can_be_edited:flags.1?Bool can_change_info:flags.2?Bool can_post_messages:flags.3?Bool can_edit_messages:flags.4?Bool can_delete_messages:flags.5?Bool can_invite_users:flags.6?Bool can_restrict_members:flags.7?Bool can_pin_messages:flags.8?Bool can_promote_members:flags.9?Bool can_send_messages:flags.10?Bool can_send_media_messages:flags.11?Bool can_send_other_messages:flags.12?Bool can_add_web_page_previews:flags.13?Bool = pyrogram.ChatMember; -pyrogram.sticker#b0700017 flags:# file_id:string width:int height:int thumb:flags.0?PhotoSize emoji:flags.1?string set_name:flags.2?string mask_position:flags.3?MaskPosition file_size:flags.4?int = pyrogram.Sticker; +pyrogram.sticker#b0700017 flags:# file_id:string thumb:flags.0?PhotoSize file_name:flags.1?string mime_type:flags.2?string file_size:flags.3?int date:flags.4?int width:int height:int emoji:flags.5?string set_name:flags.6?string mask_position:flags.7?MaskPosition = pyrogram.Sticker; diff --git a/pyrogram/client/message_parser.py b/pyrogram/client/message_parser.py index aa82c1b7..c04d599f 100644 --- a/pyrogram/client/message_parser.py +++ b/pyrogram/client/message_parser.py @@ -409,6 +409,9 @@ def parse_message( thumb=parse_thumb(doc.thumb), # TODO: Emoji, set_name and mask_position file_size=doc.size, + mime_type=doc.mime_type, + file_name=file_name, + date=doc.date ) else: document = pyrogram.Document(