]> Untitled Git - lemmy.git/commitdiff
Fixing community search not using auth. Fixes #1411
authorDessalines <tyhou13@gmx.com>
Fri, 5 Feb 2021 15:36:28 +0000 (10:36 -0500)
committerDessalines <tyhou13@gmx.com>
Fri, 5 Feb 2021 15:36:28 +0000 (10:36 -0500)
crates/api/src/site.rs

index 8fbb8f1c5ecd1ef4346932329b7dfc0ca2b3392f..96ce50cab6476683f3bf96babf33251ab2f52a91 100644 (file)
@@ -405,6 +405,7 @@ impl Perform for Search {
           CommunityQueryBuilder::create(conn)
             .sort(&sort)
             .search_term(q)
+            .my_user_id(user_id)
             .page(page)
             .limit(limit)
             .list()
@@ -458,6 +459,7 @@ impl Perform for Search {
           CommunityQueryBuilder::create(conn)
             .sort(&sort)
             .search_term(q)
+            .my_user_id(user_id)
             .page(page)
             .limit(limit)
             .list()
@@ -482,6 +484,7 @@ impl Perform for Search {
           PostQueryBuilder::create(conn)
             .sort(&sort)
             .show_nsfw(true)
+            .my_user_id(user_id)
             .community_id(community_id)
             .community_name(community_name)
             .url_search(q)