aboutsummaryrefslogtreecommitdiff
path: root/keyserver
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-09-09 13:31:55 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-09-09 13:31:55 +0100
commite1bc4f6a1ed446380408fad902ed1e314bcd99c5 (patch)
tree4ea91cdec8a9fe87b249160865e010bc6b1cde2f /keyserver
parentc0e17bbe1bfbfdb93b7ab6baffc4a53d94ad7937 (diff)
Fix database transaction for keyserver `DeleteDeviceKeys`
Diffstat (limited to 'keyserver')
-rw-r--r--keyserver/storage/shared/storage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/keyserver/storage/shared/storage.go b/keyserver/storage/shared/storage.go
index 0e587b5a..5beeed0f 100644
--- a/keyserver/storage/shared/storage.go
+++ b/keyserver/storage/shared/storage.go
@@ -158,7 +158,7 @@ func (d *Database) MarkDeviceListStale(ctx context.Context, userID string, isSta
// DeleteDeviceKeys removes the device keys for a given user/device, and any accompanying
// cross-signing signatures relating to that device.
func (d *Database) DeleteDeviceKeys(ctx context.Context, userID string, deviceIDs []gomatrixserverlib.KeyID) error {
- return d.Writer.Do(nil, nil, func(txn *sql.Tx) error {
+ return d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
for _, deviceID := range deviceIDs {
if err := d.CrossSigningSigsTable.DeleteCrossSigningSigsForTarget(ctx, txn, userID, deviceID); err != nil && err != sql.ErrNoRows {
return fmt.Errorf("d.CrossSigningSigsTable.DeleteCrossSigningSigsForTarget: %w", err)