diff --git a/crates/api_crud/src/private_message/read.rs b/crates/api_crud/src/private_message/read.rs index 933d410f1..9f289c911 100644 --- a/crates/api_crud/src/private_message/read.rs +++ b/crates/api_crud/src/private_message/read.rs @@ -18,7 +18,7 @@ pub async fn get_private_message( let limit = data.limit; let unread_only = data.unread_only.unwrap_or_default(); let creator_id = data.creator_id; - let mut messages = PrivateMessageQuery { + let messages = PrivateMessageQuery { page, limit, unread_only, @@ -27,14 +27,6 @@ pub async fn get_private_message( .list(&mut context.pool(), person_id) .await?; - // Messages sent by ourselves should be marked as read. The `read` column in database is only - // for the recipient, and shouldnt be exposed to sender. - messages.iter_mut().for_each(|pmv| { - if pmv.creator.id == person_id { - pmv.private_message.read = true - } - }); - Ok(Json(PrivateMessagesResponse { private_messages: messages, }))