summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/Rhymen/go-whatsapp/message.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-11-22 15:55:57 +0100
committerGitHub <noreply@github.com>2020-11-22 15:55:57 +0100
commit4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf (patch)
tree92d3b8d27cd35455eae7423e4d47aad67cc6a43b /vendor/github.com/Rhymen/go-whatsapp/message.go
parentcbb46293ab670c1989bfcd9aae5d853223074038 (diff)
downloadmatterbridge-msglm-4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf.tar.gz
matterbridge-msglm-4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf.tar.bz2
matterbridge-msglm-4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf.zip
Update vendor (#1297)
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/message.go')
-rw-r--r--vendor/github.com/Rhymen/go-whatsapp/message.go17
1 files changed, 7 insertions, 10 deletions
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"],
}