From ad95e356877babdf38953a521f54b303e108d490 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 29 Nov 2020 15:30:21 +0100 Subject: [PATCH] Rename jfif to jpg (whatsapp). Fixes #1292 --- bridge/whatsapp/handlers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go index a08cba75..54e07075 100644 --- a/bridge/whatsapp/handlers.go +++ b/bridge/whatsapp/handlers.go @@ -170,6 +170,11 @@ func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) { return } + // rename .jfif to .jpg https://github.com/42wim/matterbridge/issues/1292 + if fileExt[0] == ".jfif" { + fileExt[0] = ".jpg" + } + filename := fmt.Sprintf("%v%v", message.Info.Id, fileExt[0]) b.Log.Debugf("Trying to download %s with type %s", filename, message.Type)