fix: phrase filter
This commit is contained in:
parent
84daf8bd04
commit
53fb4d5778
1 changed files with 4 additions and 0 deletions
|
@ -481,6 +481,10 @@ impl DataManager {
|
||||||
|
|
||||||
for mut post in posts.clone() {
|
for mut post in posts.clone() {
|
||||||
for phrase in muted {
|
for phrase in muted {
|
||||||
|
if phrase.is_empty() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if post.content.contains(phrase) {
|
if post.content.contains(phrase) {
|
||||||
post.context.content_warning = "Contains muted phrase".to_string();
|
post.context.content_warning = "Contains muted phrase".to_string();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue