From 923d7f0ecaa3ccc85a62e407082c2f7ea31473fa Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 10 Nov 2024 10:15:58 -0500 Subject: [PATCH] Fix override logic. --- crates/apub/src/api/list_posts.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/apub/src/api/list_posts.rs b/crates/apub/src/api/list_posts.rs index 6cfbe18b6..5067d7da2 100644 --- a/crates/apub/src/api/list_posts.rs +++ b/crates/apub/src/api/list_posts.rs @@ -95,9 +95,9 @@ pub async fn list_posts( // If in their user settings (or as part of the API request), auto-mark fetched posts as read if let Some(local_user) = local_user { - if data - .auto_mark_fetched_posts_as_read - .unwrap_or(local_user.auto_mark_fetched_posts_as_read) + // If false is passed, then don't mark as read + if data.auto_mark_fetched_posts_as_read.unwrap_or(true) + && local_user.auto_mark_fetched_posts_as_read { let post_ids = posts.iter().map(|p| p.post.id).collect::>(); PostRead::mark_as_read(&mut context.pool(), &post_ids, local_user.person_id).await?;