mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-10-22 21:54:07 +00:00
Fix lints
This commit is contained in:
1 parent
09139721c0
commit
5eadefa729
2 files changed
+11
-9
No files matched your search
@@ -458,11 +458,12 @@ pub(crate) async fn post(
|
||||
// Now we can create the device on the homeserver, without holding the
|
||||
// transaction
|
||||
//
|
||||
// Normally, devices get synced to the homeserver in a `SyncDevicesJob` but we want
|
||||
// the device to be created synchronously on the homeserver, so that when we
|
||||
// respond, the device already exists (TODO: Why important?). We're using an upsert
|
||||
// so if the device already exists for some reason (like when we're replacing it, or
|
||||
// a concurrent device sync happening) it won't have any effect.
|
||||
// Normally, devices get synced to the homeserver in a `SyncDevicesJob` but we
|
||||
// want the device to be created synchronously on the homeserver, so that
|
||||
// when we respond, the device already exists (TODO: Why important?). We're
|
||||
// using an upsert so if the device already exists for some reason (like
|
||||
// when we're replacing it, or a concurrent device sync happening) it won't
|
||||
// have any effect.
|
||||
if let Err(err) = homeserver
|
||||
.upsert_device(
|
||||
&user.username,
|
||||
|
||||
@@ -122,10 +122,11 @@ pub(crate) async fn post(
|
||||
|
||||
// Schedule a job to sync the devices of the user with the homeserver
|
||||
//
|
||||
// Doing this in a background job is ok as the access token will be invalid right
|
||||
// away (from the session being finished above) and we do actually want to do a full
|
||||
// device list sync, because we're not sure whether we want to delete the device (if
|
||||
// there is for example a concurrent logout and login with the same device ID).
|
||||
// Doing this in a background job is ok as the access token will be invalid
|
||||
// right away (from the session being finished above) and we do actually
|
||||
// want to do a full device list sync, because we're not sure whether we
|
||||
// want to delete the device (if there is for example a concurrent logout
|
||||
// and login with the same device ID).
|
||||
repo.queue_job()
|
||||
.schedule_job(&mut rng, &clock, SyncDevicesJob::new(&user))
|
||||
.await?;
|
||||
|
||||
Reference in new issue
Block a user