4
0
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:
Wim
2020-10-11 23:07:00 +02:00
committed by GitHub
parent 219a5453f9
commit 2d98df6122
38 changed files with 5802 additions and 3646 deletions

View File

@@ -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
}