From ffb6c8da5856fa64fb56c3128c35a54908e05af6 Mon Sep 17 00:00:00 2001 From: sup39 Date: Fri, 23 Feb 2024 20:08:10 +0900 Subject: [PATCH] fix (backend-rs): properly compare strings in check_word_mute Co-authored-by: naskya --- packages/backend-rs/src/util/check_word_mute.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-rs/src/util/check_word_mute.rs b/packages/backend-rs/src/util/check_word_mute.rs index 865dc18c..38e4b7f3 100644 --- a/packages/backend-rs/src/util/check_word_mute.rs +++ b/packages/backend-rs/src/util/check_word_mute.rs @@ -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())