mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 15:10:28 +00:00
Make DocumentMessage handler use FileName attribute (whatsapp) (#1488)
* [whatsapp] make DocumentMessage handler use FileName attribute. referenced: https://github.com/Rhymen/go-whatsapp/blob/master/message.go#L582 * fix lint
This commit is contained in:
parent
4b4b2d790e
commit
4fcad8e04b
@ -359,9 +359,9 @@ func (b *Bwhatsapp) HandleDocumentMessage(message whatsapp.DocumentMessage) {
|
|||||||
return
|
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)
|
b.Log.Debugf("Trying to download %s with extension %s and type %s", filename, fileExt, message.Type)
|
||||||
|
|
||||||
data, err := message.Download()
|
data, err := message.Download()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user