mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-23 15:54:12 +03:00
Get name attribute from streams instead always 'unnamed'
This commit is contained in:
parent
623c1bd7d1
commit
3b0ab7794b
|
@ -1226,8 +1226,8 @@ class TelegramClient(TelegramBareClient):
|
|||
attr_dict[DocumentAttributeVideo] = doc
|
||||
else:
|
||||
attr_dict = {
|
||||
DocumentAttributeFilename:
|
||||
DocumentAttributeFilename('unnamed')
|
||||
DocumentAttributeFilename: DocumentAttributeFilename(
|
||||
getattr(file, 'name', None) or 'unnamed')
|
||||
}
|
||||
|
||||
if 'is_voice_note' in kwargs:
|
||||
|
|
Loading…
Reference in New Issue
Block a user