You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-07 17:03:01 +03:00
Make the mas-cli manage verify-email
mark the email as primary
This commit is contained in:
@@ -154,6 +154,11 @@ impl Options {
|
|||||||
.context("Email not found")?;
|
.context("Email not found")?;
|
||||||
let email = repo.user_email().mark_as_verified(&clock, email).await?;
|
let email = repo.user_email().mark_as_verified(&clock, email).await?;
|
||||||
|
|
||||||
|
// If the user has no primary email, set this one as primary.
|
||||||
|
if user.primary_user_email_id.is_none() {
|
||||||
|
repo.user_email().set_as_primary(&email).await?;
|
||||||
|
}
|
||||||
|
|
||||||
repo.into_inner().commit().await?;
|
repo.into_inner().commit().await?;
|
||||||
info!(?email, "Email marked as verified");
|
info!(?email, "Email marked as verified");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user