From ddfce4b7ea9b159b454c7730f43fa57b4fa702b7 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 16 Apr 2018 00:30:49 +0200 Subject: [PATCH] Add file_name, mime_type and date to VideoNote objects --- compiler/api/source/pyrogram.tl | 2 +- pyrogram/client/message_parser.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/api/source/pyrogram.tl b/compiler/api/source/pyrogram.tl index 76b17d65..1e5ea31b 100644 --- a/compiler/api/source/pyrogram.tl +++ b/compiler/api/source/pyrogram.tl @@ -12,7 +12,7 @@ pyrogram.audio#b0700006 flags:# file_id:string thumb:flags.0?PhotoSize file_name pyrogram.document#b0700007 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 = pyrogram.Document; pyrogram.video#b0700008 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 duration:int = pyrogram.Video; pyrogram.voice#b0700009 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 duration:int = pyrogram.Voice; -pyrogram.videoNote#b0700010 flags:# file_id:string length:int duration:int thumb:flags.0?PhotoSize file_size:flags.1?int = pyrogram.VideoNote; +pyrogram.videoNote#b0700010 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 length:int duration:int = pyrogram.VideoNote; pyrogram.contact#b0700011 flags:# phone_number:string first_name:string last_name:flags.0?string user_id:flags.1?int = pyrogram.Contact; pyrogram.location#b0700012 longitude:double latitude:double = pyrogram.Location; pyrogram.venue#b0700013 flags:# location:Location title:string address:string foursquare_id:flags.0?string = pyrogram.Venue; diff --git a/pyrogram/client/message_parser.py b/pyrogram/client/message_parser.py index befd04a5..aa82c1b7 100644 --- a/pyrogram/client/message_parser.py +++ b/pyrogram/client/message_parser.py @@ -366,7 +366,10 @@ def parse_message( length=video_attributes.w, duration=video_attributes.duration, thumb=parse_thumb(doc.thumb), - file_size=doc.size + file_size=doc.size, + file_name=file_name, + mime_type=doc.mime_type, + date=doc.date ) else: video = pyrogram.Video(