summaryrefslogtreecommitdiffstats
path: root/bridge/whatsapp/handlers.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-05-23 00:17:55 +0200
committerGitHub <noreply@github.com>2021-05-23 00:17:55 +0200
commitb9fb3619594734017baaaca295c98c2881ce7423 (patch)
tree0f51cc0c6df163fab2cce38ceee9826a35943d93 /bridge/whatsapp/handlers.go
parenta189298ab0d1d8172cfbab9bee1c27c988e0af10 (diff)
downloadmatterbridge-msglm-b9fb3619594734017baaaca295c98c2881ce7423.tar.gz
matterbridge-msglm-b9fb3619594734017baaaca295c98c2881ce7423.tar.bz2
matterbridge-msglm-b9fb3619594734017baaaca295c98c2881ce7423.zip
Rename .jpe files to .jpg Fixes #1463 (whatsapp) (#1485)
Diffstat (limited to 'bridge/whatsapp/handlers.go')
-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 55aaf868..8eb02b58 100644
--- a/bridge/whatsapp/handlers.go
+++ b/bridge/whatsapp/handlers.go
@@ -175,6 +175,11 @@ func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) {
fileExt[0] = ".jpg"
}
+ // rename .jpe to .jpg https://github.com/42wim/matterbridge/issues/1463
+ if fileExt[0] == ".jpe" {
+ 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)