mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-18 19:16:43 +00: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
|
attr_dict[DocumentAttributeVideo] = doc
|
||||||
else:
|
else:
|
||||||
attr_dict = {
|
attr_dict = {
|
||||||
DocumentAttributeFilename:
|
DocumentAttributeFilename: DocumentAttributeFilename(
|
||||||
DocumentAttributeFilename('unnamed')
|
getattr(file, 'name', None) or 'unnamed')
|
||||||
}
|
}
|
||||||
|
|
||||||
if 'is_voice_note' in kwargs:
|
if 'is_voice_note' in kwargs:
|
||||||
|
Loading…
Reference in New Issue
Block a user