From c7f1988cc22576addd1c795e541bbbaa14560740 Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 18 Sep 2023 23:11:29 +0200 Subject: [PATCH] Community Unpin Fix --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f18e999..9ff839c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -215,7 +215,7 @@ impl Bot { let post_list: GetPostsResponse = serde_json::from_str(post_list_json.as_str()).unwrap(); for post_view in post_list.posts { - if &post_view.community.id != meta_community && post_view.post.featured_local { + if &post_view.community.id != meta_community && ( ( pin_scope == PostFeatureType::Local && post_view.post.featured_local ) || ( pin_scope == PostFeatureType::Community && post_view.post.featured_community ) ) { let remove_local_pin = FeaturePost { post_id: post_view.post.id, featured: false,