mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +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:
|
||||
attr_dict = {
|
||||
DocumentAttributeFilename: DocumentAttributeFilename(
|
||||
getattr(file, 'name', None) or 'unnamed')
|
||||
os.path.basename(
|
||||
getattr(file, 'name', None) or 'unnamed'))
|
||||
}
|
||||
|
||||
if 'is_voice_note' in kwargs:
|
||||
|
|
Loading…
Reference in New Issue
Block a user