mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-26 03:11:37 +00:00
Fix crash on encountering VideoMessage (whatsapp) (#1483)
* [whatsapp] fix crash on encountering VideoMessage * Update handlers.go * gofmt
This commit is contained in:
parent
b9fb361959
commit
ec6ae343dd
@ -237,6 +237,10 @@ func (b *Bwhatsapp) HandleVideoMessage(message whatsapp.VideoMessage) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(fileExt) == 0 {
|
||||||
|
fileExt = append(fileExt, ".mp4")
|
||||||
|
}
|
||||||
|
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user