Only send PNGs as images

This commit is contained in:
Tulir Asokan
2018-01-28 21:35:04 +02:00
parent 28593ea50c
commit 9ebc7f5d57
2 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ class User:
file_handle = self.client.upload_file(file, file_name=file_name, use_cache=False)
if mime_type.startswith("image/"):
if mime_type == "image/png":
media = InputMediaUploadedPhoto(file_handle, caption or "")
else:
attr_dict = {type(attr): attr for attr in attributes}