Fix crash on encountering VideoMessage (whatsapp) (#1483)

* [whatsapp] fix crash on encountering VideoMessage

* Update handlers.go

* gofmt
pull/1491/head^2
Avinash Reddy 3 years ago committed by GitHub
parent b9fb361959
commit ec6ae343dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save