mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Update last seen on sync requests (#1593)
* Update last seen on sync requests * Fix MSC2836 unit tests * Only update once per minute * Remove debug logging * Configurable option * Simplify updateLastSeen/cleanLastSeen
This commit is contained in:
parent
13cbd50dc2
commit
c636be5070
14 changed files with 127 additions and 14 deletions
|
@ -32,6 +32,7 @@ const (
|
|||
PerformAccountCreationPath = "/userapi/performAccountCreation"
|
||||
PerformPasswordUpdatePath = "/userapi/performPasswordUpdate"
|
||||
PerformDeviceDeletionPath = "/userapi/performDeviceDeletion"
|
||||
PerformLastSeenUpdatePath = "/userapi/performLastSeenUpdate"
|
||||
PerformDeviceUpdatePath = "/userapi/performDeviceUpdate"
|
||||
PerformAccountDeactivationPath = "/userapi/performAccountDeactivation"
|
||||
|
||||
|
@ -119,6 +120,18 @@ func (h *httpUserInternalAPI) PerformDeviceDeletion(
|
|||
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
|
||||
func (h *httpUserInternalAPI) PerformLastSeenUpdate(
|
||||
ctx context.Context,
|
||||
req *api.PerformLastSeenUpdateRequest,
|
||||
res *api.PerformLastSeenUpdateResponse,
|
||||
) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PerformLastSeen")
|
||||
defer span.Finish()
|
||||
|
||||
apiURL := h.apiURL + PerformLastSeenUpdatePath
|
||||
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, req, res)
|
||||
}
|
||||
|
||||
func (h *httpUserInternalAPI) PerformDeviceUpdate(ctx context.Context, req *api.PerformDeviceUpdateRequest, res *api.PerformDeviceUpdateResponse) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PerformDeviceUpdate")
|
||||
defer span.Finish()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue