Skip to content

Commit

Permalink
move up sending identify
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfl0wer committed Aug 26, 2024
1 parent e316372 commit d846ce9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/auth/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ impl Instance {
.token;
user.set_token(&token);

let mut identify = GatewayIdentifyPayload::common();
identify.token = user.token();
user.gateway.send_identify(identify).await;

let object = User::get(&mut user, None).await?;
let settings = User::get_settings(&mut user).await?;

*user.object.write().unwrap() = object;
*user.settings.write().unwrap() = settings;

let mut identify = GatewayIdentifyPayload::common();
identify.token = user.token();
user.gateway.send_identify(identify).await;

Ok(user)
}
}

0 comments on commit d846ce9

Please sign in to comment.