summaryrefslogtreecommitdiff
path: root/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/pleroma_api/controllers/chat_controller.ex')
-rw-r--r--lib/pleroma/web/pleroma_api/controllers/chat_controller.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
index f22f33de9..29922da99 100644
--- a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
+++ b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
@@ -90,7 +90,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
def mark_as_read(%{assigns: %{user: %{id: user_id}}} = conn, %{id: id}) do
with %Chat{} = chat <- Repo.get_by(Chat, id: id, user_id: user_id),
- {:ok, chat} <- Chat.mark_as_read(chat) do
+ {_n, _} <- ChatMessageReference.set_all_seen_for_chat(chat) do
conn
|> put_view(ChatView)
|> render("show.json", chat: chat)