mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 02:02:19 +00:00
ChatMessageReferenceView: Return read status as unread
.
This commit is contained in:
parent
fb4ae9c720
commit
c020fd4352
|
@ -30,7 +30,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatMessageReferenceView do
|
|||
attachment:
|
||||
chat_message["attachment"] &&
|
||||
StatusView.render("attachment.json", attachment: chat_message["attachment"]),
|
||||
seen: seen
|
||||
unread: !seen
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatMessageReferenceViewTest 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 @@ defmodule Pleroma.Web.PleromaAPI.ChatMessageReferenceViewTest 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