mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-09-11 01:52:30 +00:00
Update vendor (#1257)
This commit is contained in:
10
vendor/github.com/Rhymen/go-whatsapp/message.go
generated
vendored
10
vendor/github.com/Rhymen/go-whatsapp/message.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user