diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-09-08 17:47:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 17:47:54 +0100 |
commit | a0f2a4510fd6f838e12e1654148a17b653574f8b (patch) | |
tree | 854db62cd1ff5fd68679504afe66b307d11bad98 /keyserver/storage/postgres | |
parent | b4bd0cc0f5440fe6b61de050c49ed723b26d7bb4 (diff) |
Exclude deleted keys from selectBatchDeviceKeysSQL (#1412)
Diffstat (limited to 'keyserver/storage/postgres')
-rw-r--r-- | keyserver/storage/postgres/device_keys_table.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keyserver/storage/postgres/device_keys_table.go b/keyserver/storage/postgres/device_keys_table.go index 779d02c0..e5bec8f6 100644 --- a/keyserver/storage/postgres/device_keys_table.go +++ b/keyserver/storage/postgres/device_keys_table.go @@ -53,7 +53,7 @@ const selectDeviceKeysSQL = "" + "SELECT key_json, stream_id, display_name FROM keyserver_device_keys WHERE user_id=$1 AND device_id=$2" const selectBatchDeviceKeysSQL = "" + - "SELECT device_id, key_json, stream_id, display_name FROM keyserver_device_keys WHERE user_id=$1" + "SELECT device_id, key_json, stream_id, display_name FROM keyserver_device_keys WHERE user_id=$1 AND key_json <> ''" const selectMaxStreamForUserSQL = "" + "SELECT MAX(stream_id) FROM keyserver_device_keys WHERE user_id=$1" |