4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-03 14:17:45 +00:00

Update dependencies (#1822)

This commit is contained in:
Wim
2022-05-02 00:10:54 +02:00
committed by GitHub
parent 888c8b9a84
commit 81e6f75aa4
54 changed files with 640 additions and 232 deletions

View File

@ -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(),