2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-01 23:05:15 +00:00

Add date field to Document type

This commit is contained in:
Dan
2018-04-15 23:54:46 +02:00
parent e08e2850ee
commit 44dda8550f
2 changed files with 5 additions and 3 deletions

View File

@@ -343,7 +343,8 @@ def parse_message(
thumb=parse_thumb(doc.thumb),
file_name=file_name,
mime_type=doc.mime_type,
file_size=doc.size
file_size=doc.size,
date=doc.date
)
elif types.DocumentAttributeVideo in attributes:
video_attributes = attributes[types.DocumentAttributeVideo]
@@ -415,7 +416,8 @@ def parse_message(
thumb=parse_thumb(doc.thumb),
file_name=file_name,
mime_type=doc.mime_type,
file_size=doc.size
file_size=doc.size,
date=doc.date
)
else:
media = None