aboutsummaryrefslogtreecommitdiffstats
path: root/import.py
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-09-05 17:19:25 +0300
committerTulir Asokan <tulir@maunium.net>2020-09-05 17:19:25 +0300
commit6e6aad0430686189f155193e74db5bedad1bcca0 (patch)
treef5851af2002474ffac5b273535ceaf479635ff5b /import.py
parent47f3d3fdee2445a5f87b9e04971e820e234a5e59 (diff)
Add more Element iOS compatibility (ref #8)
Diffstat (limited to 'import.py')
-rw-r--r--import.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/import.py b/import.py
index 27fd4ac..424c47a 100644
--- a/import.py
+++ b/import.py
@@ -3,7 +3,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from typing import Dict, TypedDict
+from typing import Dict, TypedDict, Optional
from io import BytesIO
import argparse
import os.path
@@ -75,6 +75,8 @@ class MatrixMediaInfo(TypedDict):
h: int
size: int
mimetype: str
+ thumbnail_url: Optional[str]
+ thumbnail_info: Optional['MatrixMediaInfo']
class MatrixStickerInfo(TypedDict, total=False):
@@ -122,6 +124,7 @@ async def reupload_document(client: TelegramClient, document: Document) -> Matri
"w": width,
"h": height,
"size": len(data),
+ "mimetype": "image/png",
},
},
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage