mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Fix edge cases around device lists (#1234)
* Fix New users appear in /keys/changes * Create blank device keys when logging in on a new device * Add PerformDeviceUpdate and fix a few bugs - Correct device deletion query on sqlite - Return no keys on /keys/query rather than an empty key * Unbreak sqlite properly * Use a real DB for currentstateserver integration tests * Race fix
This commit is contained in:
parent
a7e67e65a8
commit
b5cb1d1534
13 changed files with 167 additions and 52 deletions
|
@ -31,6 +31,7 @@ const (
|
|||
PerformDeviceCreationPath = "/userapi/performDeviceCreation"
|
||||
PerformAccountCreationPath = "/userapi/performAccountCreation"
|
||||
PerformDeviceDeletionPath = "/userapi/performDeviceDeletion"
|
||||
PerformDeviceUpdatePath = "/userapi/performDeviceUpdate"
|
||||
|
||||
QueryProfilePath = "/userapi/queryProfile"
|
||||
QueryAccessTokenPath = "/userapi/queryAccessToken"
|
||||
|
@ -104,6 +105,14 @@ func (h *httpUserInternalAPI) PerformDeviceDeletion(
|
|||
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
|
||||
func (h *httpUserInternalAPI) PerformDeviceUpdate(ctx context.Context, req *api.PerformDeviceUpdateRequest, res *api.PerformDeviceUpdateResponse) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PerformDeviceUpdate")
|
||||
defer span.Finish()
|
||||
|
||||
apiURL := h.apiURL + PerformDeviceUpdatePath
|
||||
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, req, res)
|
||||
}
|
||||
|
||||
func (h *httpUserInternalAPI) QueryProfile(
|
||||
ctx context.Context,
|
||||
request *api.QueryProfileRequest,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue