diff options
author | Wim <wim@42.be> | 2021-03-20 23:12:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 23:12:59 +0100 |
commit | 7466e1d014054fda5d47b9261f29811ffc599dc1 (patch) | |
tree | e1aef020e5e1d0d9f4f619ad42177ff7a8d512ed | |
parent | 2a7f28606c4984a37c89b0c90cfa986a602d1e77 (diff) | |
download | matterbridge-msglm-7466e1d014054fda5d47b9261f29811ffc599dc1.tar.gz matterbridge-msglm-7466e1d014054fda5d47b9261f29811ffc599dc1.tar.bz2 matterbridge-msglm-7466e1d014054fda5d47b9261f29811ffc599dc1.zip |
Set ogg as default audiomessage when none found (whatsapp). Fixes #1427 (#1431)
-rw-r--r-- | bridge/whatsapp/handlers.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go index 54e07075..411676e2 100644 --- a/bridge/whatsapp/handlers.go +++ b/bridge/whatsapp/handlers.go @@ -289,6 +289,10 @@ func (b *Bwhatsapp) HandleAudioMessage(message whatsapp.AudioMessage) { return } + if len(fileExt) == 0 { + fileExt = append(fileExt, ".ogg") + } + 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) |