You've already forked AstralRinth
forked from didirus/AstralRinth
Revert "Add auto-reporting inappropriate text content" (#397)
* Revert "Add auto-reporting inappropriate text content (#387)"
This reverts commit 68f7dc9512.
* Maybe don't revert the whole thing
This commit is contained in:
@@ -247,52 +247,19 @@ pub async fn auth_callback(
|
||||
}
|
||||
|
||||
if let Some(username) = username {
|
||||
let new_user = User {
|
||||
User {
|
||||
id: user_id,
|
||||
github_id: Some(user.id as i64),
|
||||
username: username.clone(),
|
||||
username,
|
||||
name: user.name,
|
||||
email: user.email,
|
||||
avatar_url: Some(user.avatar_url),
|
||||
bio: user.bio,
|
||||
created: OffsetDateTime::now_utc(),
|
||||
role: Role::Developer.to_string(),
|
||||
};
|
||||
|
||||
crate::util::report::censor_check(
|
||||
&*username,
|
||||
None,
|
||||
None,
|
||||
Some(user_id),
|
||||
"New user's username is inappropriate".to_string(),
|
||||
&mut transaction,
|
||||
)
|
||||
}
|
||||
.insert(&mut transaction)
|
||||
.await?;
|
||||
|
||||
if let Some(name) = &new_user.name {
|
||||
crate::util::report::censor_check(
|
||||
&*name,
|
||||
None,
|
||||
None,
|
||||
Some(user_id),
|
||||
"New user's name is inappropriate".to_string(),
|
||||
&mut transaction,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
if let Some(bio) = &new_user.bio {
|
||||
crate::util::report::censor_check(
|
||||
&*bio,
|
||||
None,
|
||||
None,
|
||||
Some(user_id),
|
||||
"New user's bio is inappropriate".to_string(),
|
||||
&mut transaction,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
||||
new_user.insert(&mut transaction).await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user