forked from jshiffer/matterbridge
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
|
||||
}
|
||||
|
||||
if len(fileExt) == 0 {
|
||||
fileExt = append(fileExt, ".mp4")
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user