Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 081880a7fbcb1d1af2b08711607641015c5f4785 Author: Avinash Reddy <cassilasreddythemostwanted3108@gmail.com> Date: Wed May 26 03:36:45 2021 +0000 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 diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go index 04e4469..1be9b5e 100644 --- a/bridge/whatsapp/handlers.go +++ b/bridge/whatsapp/handlers.go @@ -3599 +3599 @@ 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 {