summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/store/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/store/store.go')
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/store.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/store/store.go b/vendor/go.mau.fi/whatsmeow/store/store.go
index 76087e46..b26a28b8 100644
--- a/vendor/go.mau.fi/whatsmeow/store/store.go
+++ b/vendor/go.mau.fi/whatsmeow/store/store.go
@@ -99,6 +99,19 @@ type DeviceContainer interface {
DeleteDevice(store *Device) error
}
+type MessageSecretInsert struct {
+ Chat types.JID
+ Sender types.JID
+ ID types.MessageID
+ Secret []byte
+}
+
+type MsgSecretStore interface {
+ PutMessageSecrets([]MessageSecretInsert) error
+ PutMessageSecret(chat, sender types.JID, id types.MessageID, secret []byte) error
+ GetMessageSecret(chat, sender types.JID, id types.MessageID) ([]byte, error)
+}
+
type Device struct {
Log waLog.Logger
@@ -123,6 +136,7 @@ type Device struct {
AppState AppStateStore
Contacts ContactStore
ChatSettings ChatSettingsStore
+ MsgSecrets MsgSecretStore
Container DeviceContainer
DatabaseErrorHandler func(device *Device, action string, attemptIndex int, err error) (retry bool)