Mark the conversations with the blocked user as read and update the blocking user's unread_conversation_count.

Since the conversations with the blocked user are invisible, they are excluded
from the blocking user's `unread_conversation_count`.
This commit is contained in:
eugenijm 2019-10-25 21:29:23 +03:00
commit 0580654485
5 changed files with 175 additions and 11 deletions

View file

@ -80,7 +80,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
end
def read_conversations(%{assigns: %{user: user}} = conn, _params) do
with {:ok, participations} <- Participation.mark_all_as_read(user) do
with {:ok, _, participations} <- Participation.mark_all_as_read(user) do
conn
|> add_link_headers(participations)
|> put_view(ConversationView)