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:
17
vendor/github.com/Rhymen/go-whatsapp/message.go
generated
vendored
17
vendor/github.com/Rhymen/go-whatsapp/message.go
generated
vendored
@@ -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"],
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user