diff options
author | Wim <wim@42.be> | 2020-11-29 15:30:21 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2020-11-29 15:37:20 +0100 |
commit | ad95e356877babdf38953a521f54b303e108d490 (patch) | |
tree | 9061703268cb91776afe4e1c1610daed0dc6742f /bridge/whatsapp/handlers.go | |
parent | 640a9995f4c8b4c7262b233d3acabda4bb651e3e (diff) | |
download | matterbridge-msglm-ad95e356877babdf38953a521f54b303e108d490.tar.gz matterbridge-msglm-ad95e356877babdf38953a521f54b303e108d490.tar.bz2 matterbridge-msglm-ad95e356877babdf38953a521f54b303e108d490.zip |
Rename jfif to jpg (whatsapp). Fixes #1292
Diffstat (limited to 'bridge/whatsapp/handlers.go')
-rw-r--r-- | bridge/whatsapp/handlers.go | 5 |
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) |