[whatsapp] make DocumentMessage handler use FileName attribute.

referenced: https://github.com/Rhymen/go-whatsapp/blob/master/message.go#L582
This commit is contained in:
Avinash Reddy
2021-05-24 07:28:48 +00:00
committed by GitHub
parent ec6ae343dd
commit 4df77f6fc5

View File

@@ -359,7 +359,7 @@ func (b *Bwhatsapp) HandleDocumentMessage(message whatsapp.DocumentMessage) {
return
}
filename := fmt.Sprintf("%v%v", message.Info.Id, fileExt[0])
filename := fmt.Sprintf("%v", message.FileName)
b.Log.Debugf("Trying to download %s with type %s", filename, message.Type)