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));
pub fn list(self) -> Result<Vec<PrivateMessageView>, 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 {