mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 11:23:46 +03:00
Fix send_file(force_document=True) for albums (closes #713)
This commit is contained in:
parent
3550974b71
commit
f2407409b3
|
@ -1399,6 +1399,9 @@ class TelegramClient(TelegramBareClient):
|
|||
if utils.is_list_like(file):
|
||||
# TODO Fix progress_callback
|
||||
images = []
|
||||
if force_document:
|
||||
documents = file
|
||||
else:
|
||||
documents = []
|
||||
for x in file:
|
||||
if utils.is_image(x):
|
||||
|
@ -1417,7 +1420,7 @@ class TelegramClient(TelegramBareClient):
|
|||
|
||||
result.extend(
|
||||
self.send_file(
|
||||
entity, x, allow_cache=False,
|
||||
entity, x, allow_cache=allow_cache,
|
||||
caption=caption, force_document=force_document,
|
||||
progress_callback=progress_callback, reply_to=reply_to,
|
||||
attributes=attributes, thumb=thumb, **kwargs
|
||||
|
|
Loading…
Reference in New Issue
Block a user