From b29c5fdc69e4d3af274761dac22acc962c6f6ff1 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 26 Jul 2020 20:23:58 +0200 Subject: [PATCH] Force document when using send_document --- pyrogram/client/methods/messages/send_document.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyrogram/client/methods/messages/send_document.py b/pyrogram/client/methods/messages/send_document.py index 2241754b..8faf8374 100644 --- a/pyrogram/client/methods/messages/send_document.py +++ b/pyrogram/client/methods/messages/send_document.py @@ -152,6 +152,7 @@ class SendDocument(BaseClient): media = types.InputMediaUploadedDocument( mime_type=self.guess_mime_type(document) or "application/zip", file=file, + force_file=True, thumb=thumb, attributes=[ types.DocumentAttributeFilename(file_name=file_name or os.path.basename(document))