mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-25 20:52:37 +01: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
|
||||
}
|
||||
|
||||
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()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user