From: Dessalines Date: Sun, 2 Feb 2020 22:07:16 +0000 (-0500) Subject: Dont show deleted / removed replies or messages in inbox. Fixes #493 X-Git-Url: http://these/git/readmes/static/%7B%60/css/themes/%7BimageUploadUrl%7D?a=commitdiff_plain;h=46727f72dfbc24bceed6a478fcd5484ae3cc2d69;p=lemmy.git Dont show deleted / removed replies or messages in inbox. Fixes #493 --- diff --git a/server/src/db/comment_view.rs b/server/src/db/comment_view.rs index d4a65c9a..febf18b7 100644 --- a/server/src/db/comment_view.rs +++ b/server/src/db/comment_view.rs @@ -348,7 +348,9 @@ impl<'a> ReplyQueryBuilder<'a> { query = query .filter(user_id.eq(self.for_user_id)) - .filter(recipient_id.eq(self.for_user_id)); + .filter(recipient_id.eq(self.for_user_id)) + .filter(deleted.eq(false)) + .filter(removed.eq(false)); if self.unread_only { query = query.filter(read.eq(false)); diff --git a/server/src/db/private_message_view.rs b/server/src/db/private_message_view.rs index 59a573f4..e22bef50 100644 --- a/server/src/db/private_message_view.rs +++ b/server/src/db/private_message_view.rs @@ -98,7 +98,7 @@ impl<'a> PrivateMessageQueryBuilder<'a> { pub fn list(self) -> Result, Error> { use super::private_message_view::private_message_mview::dsl::*; - let mut query = self.query; + let mut query = self.query.filter(deleted.eq(false)); // If its unread, I only want the ones to me if self.unread_only {