Skip to content

Commit

Permalink
stickers: passthrough webm and tgs files
Browse files Browse the repository at this point in the history
It's not entirely clear what the mime type of TGS files should be, so we
made up our own application/x-tgs to indicate TGS.

Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Aug 8, 2023
1 parent f79ab28 commit b2f1fe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mautrix_telegram/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,7 @@ async def _handle_matrix_file(
file = await self.main_intent.download_media(content.url)

if content.msgtype == MessageType.STICKER:
if mime != "image/gif":
if mime not in ("image/webm", "image/gif", "application/x-tgs"):
mime, file, w, h = util.convert_image(
file, source_mime=mime, target_type="webp"
)
Expand Down

0 comments on commit b2f1fe2

Please sign in to comment.