From 0441a7dc844e850817f9e43c63da80b81244cd1b Mon Sep 17 00:00:00 2001 From: lseeger Date: Sat, 14 Dec 2024 15:39:37 +0100 Subject: [PATCH] converted like to ilike in filter --- crates/db_views/src/post_view.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/db_views/src/post_view.rs b/crates/db_views/src/post_view.rs index 4923f5517..2784b514a 100644 --- a/crates/db_views/src/post_view.rs +++ b/crates/db_views/src/post_view.rs @@ -214,8 +214,6 @@ fn queries<'a>() -> Queries< options.local_user.person_id(), ); - query.filter - // hide posts from deleted communities query = query.filter(community::deleted.eq(false)); @@ -360,9 +358,9 @@ fn queries<'a>() -> Queries< query = query.filter(instance_actions::blocked.is_null()); query = query.filter(person_actions::blocked.is_null()); query = query.filter( - not(post::name.like(any(post_keyword_block::keyword))) - .and(not(post::body.like(any(post_keyword_block::keyword)))) - .and(not(post::url.like(any(post_keyword_block::keyword))))); + not(post::name.ilike(post_keyword_block::keyword)) + .and(not(post::body.ilike(post_keyword_block::keyword))) + .and(not(post::url.ilike(post_keyword_block::keyword)))); } let (limit, offset) = limit_and_offset(options.page, options.limit)?;