From 4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 22 Nov 2020 15:55:57 +0100 Subject: Update vendor (#1297) --- vendor/github.com/Rhymen/go-whatsapp/message.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'vendor/github.com/Rhymen/go-whatsapp/message.go') diff --git a/vendor/github.com/Rhymen/go-whatsapp/message.go b/vendor/github.com/Rhymen/go-whatsapp/message.go index 15797cb4..34fc02af 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/message.go +++ b/vendor/github.com/Rhymen/go-whatsapp/message.go @@ -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"], } -- cgit v1.2.3