4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-09-11 01:52:30 +00:00

Update whatsapp vendor and fix a panic (#1209)

* Fix another whatsapp panic

* Update whatsapp vendor
This commit is contained in:
Wim
2020-08-24 23:35:08 +02:00
committed by GitHub
parent e8167ee3d7
commit 2f506425c2
13 changed files with 228 additions and 27 deletions

View File

@@ -70,6 +70,10 @@ func (myHandler) HandleContactMessage(message whatsapp.ContactMessage) {
fmt.Println(message)
}
func (myHandler) HandleBatteryMessage(msg whatsapp.BatteryMessage) {
fmt.Println(message)
}
wac.AddHandler(myHandler{})
```
The message handlers are all optional, you don't need to implement anything but the error handler to implement the interface. The ImageMessage, VideoMessage, AudioMessage and DocumentMessage provide a Download function to get the media data.