summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/store/sqlstore
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-05-02 00:10:54 +0200
committerGitHub <noreply@github.com>2022-05-02 00:10:54 +0200
commit81e6f75aa491c7bfa11780dd622587cf5fff3c8f (patch)
tree817bca1b4071842029af876ab622bfdcb0360cca /vendor/go.mau.fi/whatsmeow/store/sqlstore
parent888c8b9a845866730485a3a88c27027d0960d521 (diff)
downloadmatterbridge-msglm-81e6f75aa491c7bfa11780dd622587cf5fff3c8f.tar.gz
matterbridge-msglm-81e6f75aa491c7bfa11780dd622587cf5fff3c8f.tar.bz2
matterbridge-msglm-81e6f75aa491c7bfa11780dd622587cf5fff3c8f.zip
Update dependencies (#1822)
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/store/sqlstore')
-rw-r--r--vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go b/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go
index 30d91971..3150cfec 100644
--- a/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go
+++ b/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2021 Tulir Asokan
+// Copyright (c) 2022 Tulir Asokan
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -25,6 +25,8 @@ type Container struct {
db *sql.DB
dialect string
log waLog.Logger
+
+ DatabaseErrorHandler func(device *store.Device, action string, attemptIndex int, err error) (retry bool)
}
var _ store.DeviceContainer = (*Container)(nil)
@@ -89,6 +91,7 @@ type scannable interface {
func (c *Container) scanDevice(row scannable) (*store.Device, error) {
var device store.Device
+ device.DatabaseErrorHandler = c.DatabaseErrorHandler
device.Log = c.log
device.SignedPreKey = &keys.PreKey{}
var noisePriv, identityPriv, preKeyPriv, preKeySig []byte
@@ -192,6 +195,8 @@ func (c *Container) NewDevice() *store.Device {
Log: c.log,
Container: c,
+ DatabaseErrorHandler: c.DatabaseErrorHandler,
+
NoiseKey: keys.NewKeyPair(),
IdentityKey: keys.NewKeyPair(),
RegistrationID: mathRand.Uint32(),