X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f771938538f88bf1313b911c8a9c39e4e2e4c84f..a297e2ccdcabd1197af7cc7cab3c24f5aea1efc0:/app/views/api/messages/_message.xml.builder diff --git a/app/views/api/messages/_message.xml.builder b/app/views/api/messages/_message.xml.builder index 64ac9e3bc..2ab307f1a 100644 --- a/app/views/api/messages/_message.xml.builder +++ b/app/views/api/messages/_message.xml.builder @@ -8,10 +8,11 @@ attrs = { "body_format" => message.body_format } +attrs["message_read"] = message.message_read if current_user.id == message.to_user_id + if current_user.id == message.from_user_id attrs["deleted"] = !message.from_user_visible elsif current_user.id == message.to_user_id - attrs["message_read"] = message.message_read attrs["deleted"] = !message.to_user_visible end