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

Update vendor (#1297)

This commit is contained in:
Wim
2020-11-22 15:55:57 +01:00
committed by GitHub
parent cbb46293ab
commit 4cc2c914e6
166 changed files with 25790 additions and 14376 deletions

View File

@@ -238,7 +238,7 @@ func getMessageInfo(msg *proto.WebMessageInfo) MessageInfo {
return MessageInfo{
Id: msg.GetKey().GetId(),
RemoteJid: msg.GetKey().GetRemoteJid(),
SenderJid: msg.GetKey().GetParticipant(),
SenderJid: msg.GetParticipant(),
FromMe: msg.GetKey().GetFromMe(),
Timestamp: msg.GetMessageTimestamp(),
Status: MessageStatus(msg.GetStatus()),
@@ -838,19 +838,16 @@ func ParseProtoMessage(msg *proto.WebMessageInfo) interface{} {
default:
//cannot match message
return ErrMessageTypeNotImplemented
}
return nil
}
/*
BatteryMessage represents a battery level and charging state.
*/
type BatteryMessage struct {
Plugged bool
Powersave bool
Plugged bool
Powersave bool
Percentage int
}
@@ -859,8 +856,8 @@ func getBatteryMessage(msg map[string]string) BatteryMessage {
powersave, _ := strconv.ParseBool(msg["powersave"])
percentage, _ := strconv.Atoi(msg["value"])
batteryMessage := BatteryMessage{
Plugged: plugged,
Powersave: powersave,
Plugged: plugged,
Powersave: powersave,
Percentage: percentage,
}
@@ -869,7 +866,7 @@ func getBatteryMessage(msg map[string]string) BatteryMessage {
func getNewContact(msg map[string]string) Contact {
contact := Contact{
Jid: msg["jid"],
Jid: msg["jid"],
Notify: msg["notify"],
}