1
0
Fork 1
mirror of https://example.com synced 2024-11-22 06:46:40 +09:00

fix (backend-rs): properly compare strings in check_word_mute

Co-authored-by: naskya <m@naskya.net>
This commit is contained in:
sup39 2024-02-23 20:08:10 +09:00 committed by naskya
parent cd18bf0c48
commit b02bba83d3
Signed by: naskya
GPG key ID: 712D413B3A9FED5C

View file

@ -79,7 +79,7 @@ fn check_word_mute_impl(
let text_lower = text.to_lowercase();
muted_word_list
.iter()
.all(|muted_word| text_lower.contains(muted_word))
.all(|muted_word| text_lower.contains(&muted_word.to_lowercase()))
})
}) || muted_patterns.iter().any(|muted_pattern| {
Regex::new(convert_regex(muted_pattern).as_str())