5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-09 16:50:30 +00:00

Rename .jpe files to .jpg Fixes #1463 (whatsapp) (#1485)

This commit is contained in:
Wim 2021-05-23 00:17:55 +02:00 committed by GitHub
parent a189298ab0
commit b9fb361959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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