summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-11-29 15:30:21 +0100
committerWim <wim@42.be>2020-11-29 15:37:20 +0100
commitad95e356877babdf38953a521f54b303e108d490 (patch)
tree9061703268cb91776afe4e1c1610daed0dc6742f /bridge
parent640a9995f4c8b4c7262b233d3acabda4bb651e3e (diff)
downloadmatterbridge-msglm-ad95e356877babdf38953a521f54b303e108d490.tar.gz
matterbridge-msglm-ad95e356877babdf38953a521f54b303e108d490.tar.bz2
matterbridge-msglm-ad95e356877babdf38953a521f54b303e108d490.zip
Rename jfif to jpg (whatsapp). Fixes #1292
Diffstat (limited to 'bridge')
-rw-r--r--bridge/whatsapp/handlers.go5
1 files changed, 5 insertions, 0 deletions
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)