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:
Emma Cypress ⚘
2022-07-10 17:02:41 +00:00
committed by GitHub
parent 02c3894fc9
commit 6614b56298
7 changed files with 4 additions and 199 deletions

View File

@@ -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?;
}
}
}