mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-03 19:00:21 +03:00
Sending open()'ed files would make their name the entire path
This commit is contained in:
parent
5a54e2279f
commit
8d1b6629cb
|
@ -1227,7 +1227,8 @@ class TelegramClient(TelegramBareClient):
|
||||||
else:
|
else:
|
||||||
attr_dict = {
|
attr_dict = {
|
||||||
DocumentAttributeFilename: DocumentAttributeFilename(
|
DocumentAttributeFilename: DocumentAttributeFilename(
|
||||||
getattr(file, 'name', None) or 'unnamed')
|
os.path.basename(
|
||||||
|
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