Set ogg as default audiomessage when none found (whatsapp). Fixes #1427 (#1431)

This commit is contained in:
Wim 2021-03-20 23:12:59 +01:00 committed by GitHub
parent 2a7f28606c
commit 7466e1d014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,6 +289,10 @@ func (b *Bwhatsapp) HandleAudioMessage(message whatsapp.AudioMessage) {
return return
} }
if len(fileExt) == 0 {
fileExt = append(fileExt, ".ogg")
}
filename := fmt.Sprintf("%v%v", message.Info.Id, fileExt[0]) filename := fmt.Sprintf("%v%v", message.Info.Id, fileExt[0])
b.Log.Debugf("Trying to download %s with size %#v and type %s", filename, message.Length, message.Type) b.Log.Debugf("Trying to download %s with size %#v and type %s", filename, message.Length, message.Type)