summaryrefslogtreecommitdiffstats
path: root/bridge/whatsapp
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/whatsapp')
-rw-r--r--bridge/whatsapp/handlers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go
index 04e44693..1be9b5e3 100644
--- a/bridge/whatsapp/handlers.go
+++ b/bridge/whatsapp/handlers.go
@@ -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 {