feat: support animated(lottie) sticker

This commit is contained in:
xz-dev
2024-07-16 18:15:49 +08:00
parent 715f62af58
commit be477874e3
4 changed files with 32 additions and 5 deletions

View File

@ -33,7 +33,7 @@ async def reupload_document(client: TelegramClient, document: Document) -> matri
print(f"Reuploading {document.id}", end="", flush=True)
data = await client.download_media(document, file=bytes)
print(".", end="", flush=True)
data, mimetype, width, height = util.convert_image(data)
data, mimetype, width, height = util.convert_sticker(data)
print(".", end="", flush=True)
mxc = await matrix.upload(data, mimetype, f"{document.id}.png")
print(".", flush=True)