From 26297b403571edab2325be3b3ccc48c5178e33fe Mon Sep 17 00:00:00 2001 From: Nutomic Date: Thu, 23 Nov 2023 15:47:49 +0100 Subject: [PATCH] Users can view their own posts after removal (fixes #4186) (#4192) --- crates/db_views/src/post_view.rs | 12 ++++++++++-- crates/utils/translations | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/crates/db_views/src/post_view.rs b/crates/db_views/src/post_view.rs index e133d9e4a..3b67955c7 100644 --- a/crates/db_views/src/post_view.rs +++ b/crates/db_views/src/post_view.rs @@ -274,8 +274,16 @@ fn queries<'a>() -> Queries< // Hide deleted and removed for non-admins or mods if !is_mod_or_admin { query = query - .filter(community::removed.eq(false)) - .filter(post::removed.eq(false)) + .filter( + community::removed + .eq(false) + .or(post::creator_id.eq(person_id_join)), + ) + .filter( + post::removed + .eq(false) + .or(post::creator_id.eq(person_id_join)), + ) // users can see their own deleted posts .filter( community::deleted diff --git a/crates/utils/translations b/crates/utils/translations index a36865ee8..277e3c335 160000 --- a/crates/utils/translations +++ b/crates/utils/translations @@ -1 +1 @@ -Subproject commit a36865ee8ca3658fea31ba948b67b75a812e84fc +Subproject commit 277e3c335bbb9c00c4a600bd4d655b273393f84a