Added animated telegram sticker support for sticker-import

This commit is contained in:
Jakob Neufeld
2023-08-20 22:12:51 +02:00
parent f59406a47a
commit f4af9f679a
3 changed files with 29 additions and 9 deletions

View File

@ -57,7 +57,7 @@ def add_to_index(name: str, output_dir: str) -> None:
def make_sticker(mxc: str, width: int, height: int, size: int,
body: str = "") -> matrix.StickerInfo:
body: str = "", mimetype: str = "image/png") -> matrix.StickerInfo:
return {
"body": body,
"url": mxc,
@ -65,7 +65,7 @@ def make_sticker(mxc: str, width: int, height: int, size: int,
"w": width,
"h": height,
"size": size,
"mimetype": "image/png",
"mimetype": mimetype,
# Element iOS compatibility hack
"thumbnail_url": mxc,
@ -73,7 +73,7 @@ def make_sticker(mxc: str, width: int, height: int, size: int,
"w": width,
"h": height,
"size": size,
"mimetype": "image/png",
"mimetype": mimetype,
},
},
"msgtype": "m.sticker",