diff --git a/server/src/db/comment_view.rs b/server/src/db/comment_view.rs index d4a65c9..febf18b 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 59a573f..e22bef5 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 {