Add default mime type if it's missing

This commit is contained in:
Tulir Asokan 2023-10-09 12:10:34 +03:00
parent d2110f6ee7
commit 9cb0a2e43d

View file

@ -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 {