aboutsummaryrefslogtreecommitdiff
path: root/keyserver/api
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-08-12 22:43:02 +0100
committerGitHub <noreply@github.com>2020-08-12 22:43:02 +0100
commit820c56c165ec8f0409d23cd151a7ff89fbe09ffa (patch)
tree2266b281e13fc971d56625f416d1e03979062c43 /keyserver/api
parentd98ec12422c8498cf710bb34d2ed31f024aa1e15 (diff)
Fix more E2E sytests (#1265)
* WIP: Eagerly sync device lists on /user/keys/query requests Also notify servers when a user's device display name changes. Few caveats: - sytest `Device deletion propagates over federation` fails - `populateResponseWithDeviceKeysFromDatabase` is called from multiple goroutines and hence is unsafe. * Handle deleted devices correctly over federation
Diffstat (limited to 'keyserver/api')
-rw-r--r--keyserver/api/api.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/keyserver/api/api.go b/keyserver/api/api.go
index c3481a38..442af871 100644
--- a/keyserver/api/api.go
+++ b/keyserver/api/api.go
@@ -110,6 +110,11 @@ type OneTimeKeysCount struct {
type PerformUploadKeysRequest struct {
DeviceKeys []DeviceKeys
OneTimeKeys []OneTimeKeys
+ // OnlyDisplayNameUpdates should be `true` if ALL the DeviceKeys are present to update
+ // the display name for their respective device, and NOT to modify the keys. The key
+ // itself doesn't change but it's easier to pretend upload new keys and reuse the same code paths.
+ // Without this flag, requests to modify device display names would delete device keys.
+ OnlyDisplayNameUpdates bool
}
// PerformUploadKeysResponse is the response to PerformUploadKeys