Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
ea33b773 by cal0pteryx at 2026-02-24T22:40:23+01:00
cfix: Link preview: Accept all supported image types for data URIs
- - - - -
1 changed file:
- gajim/common/modules/message_util.py
Changes:
=====================================
gajim/common/modules/message_util.py
=====================================
@@ -20,6 +20,7 @@
from gajim.common import app
from gajim.common.const import EME_MESSAGES
+from gajim.common.const import IMAGE_MIME_TYPES
from gajim.common.i18n import _
from gajim.common.modules.contacts import GroupchatParticipant
from gajim.common.open_graph_parser import OpenGraphData
@@ -268,7 +269,7 @@ def _parse() -> tuple[str, bytes]:
if not image_bytes:
raise ValueError
- if datauri.media_type not in ("image/png", "image/jpeg", "image/webp"):
+ if datauri.media_type not in IMAGE_MIME_TYPES:
raise ValueError
if len(image_bytes) > 50_000:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/ea33b773c1ddcb6f3de2f23cc2f041339e78a69c
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/ea33b773c1ddcb6f3de2f23cc2f041339e78a69c
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]