forked from naskya/firefish
fix (backend-rs): properly compare strings in check_word_mute
Co-authored-by: naskya <m@naskya.net>
This commit is contained in:
parent
cd18bf0c48
commit
b02bba83d3
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ fn check_word_mute_impl(
|
||||||
let text_lower = text.to_lowercase();
|
let text_lower = text.to_lowercase();
|
||||||
muted_word_list
|
muted_word_list
|
||||||
.iter()
|
.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| {
|
}) || muted_patterns.iter().any(|muted_pattern| {
|
||||||
Regex::new(convert_regex(muted_pattern).as_str())
|
Regex::new(convert_regex(muted_pattern).as_str())
|
||||||
|
|
Loading…
Reference in a new issue