Community Unpin Fix

This commit is contained in:
Neshura 2023-09-18 23:11:29 +02:00
parent a0d414a091
commit c7f1988cc2
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -215,7 +215,7 @@ impl Bot {
let post_list: GetPostsResponse = serde_json::from_str(post_list_json.as_str()).unwrap(); let post_list: GetPostsResponse = serde_json::from_str(post_list_json.as_str()).unwrap();
for post_view in post_list.posts { 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 { let remove_local_pin = FeaturePost {
post_id: post_view.post.id, post_id: post_view.post.id,
featured: false, featured: false,