summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/types
diff options
context:
space:
mode:
authorWim <wim@42.be>2023-08-05 20:43:19 +0200
committerGitHub <noreply@github.com>2023-08-05 20:43:19 +0200
commit56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 (patch)
treeb1355645342667209263cbd355dc0b4254f1e8fe /vendor/go.mau.fi/whatsmeow/types
parent9459495484d6e06a3d46de64fccd8d06f7ccc72c (diff)
downloadmatterbridge-msglm-master.tar.gz
matterbridge-msglm-master.tar.bz2
matterbridge-msglm-master.zip
Update dependencies and remove old matterclient lib (#2067)HEADmaster
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/types')
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/events/appstate.go48
-rw-r--r--vendor/go.mau.fi/whatsmeow/types/events/events.go21
2 files changed, 57 insertions, 12 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/types/events/appstate.go b/vendor/go.mau.fi/whatsmeow/types/events/appstate.go
index d462d6f3..285e546b 100644
--- a/vendor/go.mau.fi/whatsmeow/types/events/appstate.go
+++ b/vendor/go.mau.fi/whatsmeow/types/events/appstate.go
@@ -19,7 +19,8 @@ type Contact struct {
JID types.JID // The contact who was modified.
Timestamp time.Time // The time when the modification happened.'
- Action *waProto.ContactAction // The new contact info.
+ Action *waProto.ContactAction // The new contact info.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// PushName is emitted when a message is received with a different push name than the previous value cached for the same user.
@@ -43,7 +44,8 @@ type Pin struct {
JID types.JID // The chat which was pinned or unpinned.
Timestamp time.Time // The time when the (un)pinning happened.
- Action *waProto.PinAction // Whether the chat is now pinned or not.
+ Action *waProto.PinAction // Whether the chat is now pinned or not.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// Star is emitted when a message is starred or unstarred from another device.
@@ -54,7 +56,8 @@ type Star struct {
MessageID string // The message which was starred or unstarred.
Timestamp time.Time // The time when the (un)starring happened.
- Action *waProto.StarAction // Whether the message is now starred or not.
+ Action *waProto.StarAction // Whether the message is now starred or not.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// DeleteForMe is emitted when a message is deleted (for the current user only) from another device.
@@ -65,7 +68,8 @@ type DeleteForMe struct {
MessageID string // The message which was deleted.
Timestamp time.Time // The time when the deletion happened.
- Action *waProto.DeleteMessageForMeAction // Additional information for the deletion.
+ Action *waProto.DeleteMessageForMeAction // Additional information for the deletion.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// Mute is emitted when a chat is muted or unmuted from another device.
@@ -73,7 +77,8 @@ type Mute struct {
JID types.JID // The chat which was muted or unmuted.
Timestamp time.Time // The time when the (un)muting happened.
- Action *waProto.MuteAction // The current mute status of the chat.
+ Action *waProto.MuteAction // The current mute status of the chat.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// Archive is emitted when a chat is archived or unarchived from another device.
@@ -81,7 +86,8 @@ type Archive struct {
JID types.JID // The chat which was archived or unarchived.
Timestamp time.Time // The time when the (un)archiving happened.
- Action *waProto.ArchiveChatAction // The current archival status of the chat.
+ Action *waProto.ArchiveChatAction // The current archival status of the chat.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// MarkChatAsRead is emitted when a whole chat is marked as read or unread from another device.
@@ -89,7 +95,17 @@ type MarkChatAsRead struct {
JID types.JID // The chat which was marked as read or unread.
Timestamp time.Time // The time when the marking happened.
- Action *waProto.MarkChatAsReadAction // Whether the chat was marked as read or unread, and info about the most recent messages.
+ Action *waProto.MarkChatAsReadAction // Whether the chat was marked as read or unread, and info about the most recent messages.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
+}
+
+// ClearChat is emitted when a chat is cleared on another device. This is different from DeleteChat.
+type ClearChat struct {
+ JID types.JID // The chat which was cleared.
+ Timestamp time.Time // The time when the clear happened.
+
+ Action *waProto.ClearChatAction // Information about the clear.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// DeleteChat is emitted when a chat is deleted on another device.
@@ -97,21 +113,33 @@ type DeleteChat struct {
JID types.JID // The chat which was deleted.
Timestamp time.Time // The time when the deletion happened.
- Action *waProto.DeleteChatAction // Information about the deletion.
+ Action *waProto.DeleteChatAction // Information about the deletion.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// PushNameSetting is emitted when the user's push name is changed from another device.
type PushNameSetting struct {
Timestamp time.Time // The time when the push name was changed.
- Action *waProto.PushNameSetting // The new push name for the user.
+ Action *waProto.PushNameSetting // The new push name for the user.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// UnarchiveChatsSetting is emitted when the user changes the "Keep chats archived" setting from another device.
type UnarchiveChatsSetting struct {
Timestamp time.Time // The time when the setting was changed.
- Action *waProto.UnarchiveChatsSetting // The new settings.
+ Action *waProto.UnarchiveChatsSetting // The new settings.
+ FromFullSync bool // Whether the action is emitted because of a fullSync
+}
+
+// UserStatusMute is emitted when the user mutes or unmutes another user's status updates.
+type UserStatusMute struct {
+ JID types.JID // The user who was muted or unmuted
+ Timestamp time.Time // The timestamp when the action happened
+
+ Action *waProto.UserStatusMuteAction // The new mute status
+ FromFullSync bool // Whether the action is emitted because of a fullSync
}
// AppState is emitted directly for new data received from app state syncing.
diff --git a/vendor/go.mau.fi/whatsmeow/types/events/events.go b/vendor/go.mau.fi/whatsmeow/types/events/events.go
index 4ec38d20..e1124e85 100644
--- a/vendor/go.mau.fi/whatsmeow/types/events/events.go
+++ b/vendor/go.mau.fi/whatsmeow/types/events/events.go
@@ -176,8 +176,9 @@ func (cfr ConnectFailureReason) String() string {
//
// Known reasons are handled internally and emitted as different events (e.g. LoggedOut and TemporaryBan).
type ConnectFailure struct {
- Reason ConnectFailureReason
- Raw *waBinary.Node
+ Reason ConnectFailureReason
+ Message string
+ Raw *waBinary.Node
}
// ClientOutdated is emitted when the WhatsApp server rejects the connection with the ConnectFailureClientOutdated code.
@@ -199,6 +200,13 @@ type HistorySync struct {
Data *waProto.HistorySync
}
+type DecryptFailMode string
+
+const (
+ DecryptFailShow DecryptFailMode = ""
+ DecryptFailHide DecryptFailMode = "hide"
+)
+
// UndecryptableMessage is emitted when receiving a new message that failed to decrypt.
//
// The library will automatically ask the sender to retry. If the sender resends the message,
@@ -211,6 +219,8 @@ type UndecryptableMessage struct {
// IsUnavailable is true if the recipient device didn't send a ciphertext to this device at all
// (as opposed to sending a ciphertext, but the ciphertext not being decryptable).
IsUnavailable bool
+
+ DecryptFailMode DecryptFailMode
}
// Message is emitted when receiving a new message.
@@ -224,6 +234,13 @@ type Message struct {
IsDocumentWithCaption bool // True if the message was unwrapped from a DocumentWithCaptionMessage
IsEdit bool // True if the message was unwrapped from an EditedMessage
+ // If this event was parsed from a WebMessageInfo (i.e. from a history sync or unavailable message request), the source data is here.
+ SourceWebMsg *waProto.WebMessageInfo
+ // If this event is a response to an unavailable message request, the request ID is here.
+ UnavailableRequestID types.MessageID
+ // If the message was re-requested from the sender, this is the number of retries it took.
+ RetryCount int
+
// The raw message struct. This is the raw unmodified data, which means the actual message might
// be wrapped in DeviceSentMessage, EphemeralMessage or ViewOnceMessage.
RawMessage *waProto.Message