feat: allow - and _ in usernames

This commit is contained in:
oSumAtrIX 2022-09-08 02:27:11 +02:00 committed by GitHub
commit 276788872c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ pub async fn cure(
let mut cured_name = DECANCER
.cure(&name)
.replace(|c: char| !(c == ' ' || c.is_ascii_alphanumeric()), "");
.replace(|c: char| !(c == ' ' || c == '-' || c == '_' || c.is_ascii_alphanumeric()), "");
if cured_name.is_empty() {
cured_name = "ReVanced user".to_string();