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,