From 9cb0a2e43d9080f086304084d04c5d6aa7521933 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 9 Oct 2023 12:10:34 +0300 Subject: [PATCH] Add default mime type if it's missing --- portal.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/portal.go b/portal.go index cf1ad94..e513e81 100644 --- a/portal.go +++ b/portal.go @@ -3665,6 +3665,9 @@ func (portal *Portal) preprocessMatrixMedia(ctx context.Context, sender *User, r } } mimeType := content.GetInfo().MimeType + if mimeType == "" { + content.Info.MimeType = "application/octet-stream" + } var convertErr error // Allowed mime types from https://developers.facebook.com/docs/whatsapp/on-premises/reference/media switch {