File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
crates/handlers/src/admin/v1/compat_sessions Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,14 @@ pub async fn handler(
9999 return Err ( RouteError :: AlreadyFinished ( id) ) ;
100100 }
101101
102- // Load the user to schedule a device sync job
103- let user = repo
104- . user ( )
105- . lookup ( session. user_id )
106- . await ?
107- . ok_or_else ( || RouteError :: Internal ( "User not found for session" . into ( ) ) ) ?;
108-
109102 // Schedule a job to sync the devices of the user with the homeserver
110- tracing:: info!( user. id = %user . id , "Scheduling device sync job for user" ) ;
103+ tracing:: info!( user. id = %session . user_id , "Scheduling device sync job for user" ) ;
111104 repo. queue_job ( )
112- . schedule_job ( & mut rng, & clock, SyncDevicesJob :: new ( & user) )
105+ . schedule_job (
106+ & mut rng,
107+ & clock,
108+ SyncDevicesJob :: new_for_id ( session. user_id ) ,
109+ )
113110 . await ?;
114111
115112 // Finish the session
You can’t perform that action at this time.
0 commit comments