feat: impl archive user if not exists

This commit is contained in:
Aravinth Manivannan 2022-06-04 20:47:02 +05:30
parent 2ebd53e612
commit 54a1d28395
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88

View file

@ -73,6 +73,15 @@ impl Ctx {
let msg = u.as_ref().into();
db.add_user(&msg).await.unwrap();
federate.create_user(&msg).await.unwrap();
} else {
if !federate
.user_exists(username, gitea.get_hostname())
.await
.unwrap()
{
let msg = u.as_ref().into();
federate.create_user(&msg).await.unwrap();
}
}
}