mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Fix PhotoSize not having date anymore
This commit is contained in:
parent
6943e16636
commit
c660d3a7d0
@ -711,7 +711,9 @@ class Client(Methods, BaseClient):
|
||||
|
||||
file_name = "{}_{}_{}{}".format(
|
||||
media_type_str,
|
||||
datetime.fromtimestamp(media.date or time.time()).strftime("%Y-%m-%d_%H-%M-%S"),
|
||||
datetime.fromtimestamp(
|
||||
getattr(media, "date", None) or time.time()
|
||||
).strftime("%Y-%m-%d_%H-%M-%S"),
|
||||
self.rnd_id(),
|
||||
extension
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user