diff --git a/crates/handlers/src/compat/login.rs b/crates/handlers/src/compat/login.rs index 854b82279..7a7d85f28 100644 --- a/crates/handlers/src/compat/login.rs +++ b/crates/handlers/src/compat/login.rs @@ -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, diff --git a/crates/handlers/src/compat/logout.rs b/crates/handlers/src/compat/logout.rs index 68f8f5d96..b73e3b268 100644 --- a/crates/handlers/src/compat/logout.rs +++ b/crates/handlers/src/compat/logout.rs @@ -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?;