From 3ce007c3f8a7d1e54bbb203f5a284c459002a979 Mon Sep 17 00:00:00 2001 From: terrill <314156936@qq.com> Date: Fri, 27 Jul 2018 10:11:38 +0800 Subject: [PATCH] one_time_key inner multiple bug --- .../dendrite/encryptoapi/storage/encrypt_keys_table.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_keys_table.go b/src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_keys_table.go index 8c822fbd2..94bbce6a8 100644 --- a/src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_keys_table.go +++ b/src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_keys_table.go @@ -155,10 +155,10 @@ func (s *keyStatements) selectSingleKey( &holder.KeyAlgorithm, &holder.Signature, ); err != nil { - deleteStmt := s.deleteSingleKeyStmt - _, err = deleteStmt.ExecContext(ctx, userID, deviceID, algorithm, holder.KeyID) return holder, err } + deleteStmt := s.deleteSingleKeyStmt + _, err = deleteStmt.ExecContext(ctx, userID, deviceID, algorithm, holder.KeyID) return holder, err }