Force document when using send_document

This commit is contained in:
Dan 2020-07-26 20:23:58 +02:00
parent e5fda6f9a0
commit b29c5fdc69

View File

@ -152,6 +152,7 @@ class SendDocument(BaseClient):
media = types.InputMediaUploadedDocument( media = types.InputMediaUploadedDocument(
mime_type=self.guess_mime_type(document) or "application/zip", mime_type=self.guess_mime_type(document) or "application/zip",
file=file, file=file,
force_file=True,
thumb=thumb, thumb=thumb,
attributes=[ attributes=[
types.DocumentAttributeFilename(file_name=file_name or os.path.basename(document)) types.DocumentAttributeFilename(file_name=file_name or os.path.basename(document))