1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-06 06:02:40 +03:00

Make the mas-cli manage verify-email mark the email as primary

This commit is contained in:
Quentin Gliech
2024-03-08 15:41:52 +01:00
parent 57c5e8601f
commit e4cf2cdaf5

View File

@@ -154,6 +154,11 @@ impl Options {
.context("Email not found")?;
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?;
info!(?email, "Email marked as verified");