forked from AkkomaGang/akkoma
ChatMessageReferenceView: Return read status as unread
.
This commit is contained in:
parent
fb4ae9c720
commit
c020fd4352
2 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ def render(
|
|||
attachment:
|
||||
chat_message["attachment"] &&
|
||||
StatusView.render("attachment.json", attachment: chat_message["attachment"]),
|
||||
seen: seen
|
||||
unread: !seen
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ test "it displays a chat message" do
|
|||
assert chat_message[:account_id] == user.id
|
||||
assert chat_message[:chat_id]
|
||||
assert chat_message[:created_at]
|
||||
assert chat_message[:seen] == true
|
||||
assert chat_message[:unread] == false
|
||||
assert match?([%{shortcode: "firefox"}], chat_message[:emojis])
|
||||
|
||||
{:ok, activity} = CommonAPI.post_chat_message(recipient, user, "gkgkgk", media_id: upload.id)
|
||||
|
@ -57,6 +57,6 @@ test "it displays a chat message" do
|
|||
assert chat_message_two[:account_id] == recipient.id
|
||||
assert chat_message_two[:chat_id] == chat_message[:chat_id]
|
||||
assert chat_message_two[:attachment]
|
||||
assert chat_message_two[:seen] == false
|
||||
assert chat_message_two[:unread] == true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue