]> Untitled Git - lemmy.git/commitdiff
Merge branch 'main' into move_matrix_and_admin_to_person
authorDessalines <tyhou13@gmx.com>
Tue, 23 Mar 2021 18:16:54 +0000 (14:16 -0400)
committerDessalines <tyhou13@gmx.com>
Tue, 23 Mar 2021 18:16:54 +0000 (14:16 -0400)
crates/api/src/comment.rs
crates/api/src/local_user.rs
crates/api/src/post.rs
crates/api_structs/src/comment.rs
crates/api_structs/src/post.rs

index 61f9a7040e44744bbbb51ac004e89305c68304c1..78bb484f9d0ece58590ff37a62c80d48d31421ee 100644 (file)
@@ -684,12 +684,14 @@ impl Perform for GetComments {
 
     let community_id = data.community_id;
     let community_name = data.community_name.to_owned();
+    let saved_only = data.saved_only;
     let page = data.page;
     let limit = data.limit;
     let comments = blocking(context.pool(), move |conn| {
       CommentQueryBuilder::create(conn)
         .listing_type(type_)
         .sort(&sort)
+        .saved_only(saved_only)
         .community_id(community_id)
         .community_name(community_name)
         .my_person_id(person_id)
index 5fbbdeec4561d3f25269c7832a745afb9bad355c..20e7ff979545232a5dbddfa7a7e5719fc6d5b7f6 100644 (file)
@@ -578,6 +578,7 @@ impl Perform for GetPersonDetails {
         .my_person_id(person_id)
         .sort(&sort)
         .saved_only(saved_only)
+        .community_id(community_id)
         .page(page)
         .limit(limit);
 
index 48153a86b9d8a5455d2be9c95abd2911c9d38613..e76cfa18f644513e0c2e4ee248f31f22374fcf89 100644 (file)
@@ -253,6 +253,8 @@ impl Perform for GetPosts {
     let limit = data.limit;
     let community_id = data.community_id;
     let community_name = data.community_name.to_owned();
+    let saved_only = data.saved_only;
+
     let posts = match blocking(context.pool(), move |conn| {
       PostQueryBuilder::create(conn)
         .listing_type(&type_)
@@ -260,6 +262,7 @@ impl Perform for GetPosts {
         .show_nsfw(show_nsfw)
         .community_id(community_id)
         .community_name(community_name)
+        .saved_only(saved_only)
         .my_person_id(person_id)
         .page(page)
         .limit(limit)
index f62c41aa461e3e267ad2245ba90f0b7553e70840..1457f181a5203d907bd39f349efb2d54b149e084 100644 (file)
@@ -70,6 +70,7 @@ pub struct GetComments {
   pub limit: Option<i64>,
   pub community_id: Option<CommunityId>,
   pub community_name: Option<String>,
+  pub saved_only: bool,
   pub auth: Option<String>,
 }
 
index d0991166758f18236a39d8b882b68530278ef8ee..727859bc4cc7c7db55d034cfd851a81b66af572a 100644 (file)
@@ -49,6 +49,7 @@ pub struct GetPosts {
   pub limit: Option<i64>,
   pub community_id: Option<CommunityId>,
   pub community_name: Option<String>,
+  pub saved_only: bool,
   pub auth: Option<String>,
 }