diff options
author | Wim <wim@42.be> | 2020-10-11 23:07:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-11 23:07:00 +0200 |
commit | 2d98df61221e23b3be557d7b1931ee3d510ac32d (patch) | |
tree | 7898a2d3c2b3003bae97d50541443072046666f3 /vendor/github.com/Rhymen/go-whatsapp/message.go | |
parent | 219a5453f9edaa87aa7aa4b9d5f9c3de9c75b38f (diff) | |
download | matterbridge-msglm-2d98df61221e23b3be557d7b1931ee3d510ac32d.tar.gz matterbridge-msglm-2d98df61221e23b3be557d7b1931ee3d510ac32d.tar.bz2 matterbridge-msglm-2d98df61221e23b3be557d7b1931ee3d510ac32d.zip |
Update vendor (#1257)
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/message.go')
-rw-r--r-- | vendor/github.com/Rhymen/go-whatsapp/message.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/message.go b/vendor/github.com/Rhymen/go-whatsapp/message.go index d4bc0926..15797cb4 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/message.go +++ b/vendor/github.com/Rhymen/go-whatsapp/message.go @@ -867,11 +867,21 @@ func getBatteryMessage(msg map[string]string) BatteryMessage { return batteryMessage } +func getNewContact(msg map[string]string) Contact { + contact := Contact{ + Jid: msg["jid"], + Notify: msg["notify"], + } + + return contact +} func ParseNodeMessage(msg binary.Node) interface{} { switch msg.Description { case "battery": return getBatteryMessage(msg.Attributes) + case "user": + return getNewContact(msg.Attributes) default: //cannot match message } |