Merge branch 'develop' into refactor/following-relationships

This commit is contained in:
Egor Kislitsyn 2019-10-21 14:19:15 +07:00
commit 4ea1a61b00
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
219 changed files with 3097 additions and 4626 deletions

View file

@ -79,6 +79,15 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
end
end
def read_conversations(%{assigns: %{user: user}} = conn, _params) do
with {:ok, participations} <- Participation.mark_all_as_read(user) do
conn
|> add_link_headers(participations)
|> put_view(ConversationView)
|> render("participations.json", participations: participations, for: user)
end
end
def read_notification(%{assigns: %{user: user}} = conn, %{"id" => notification_id}) do
with {:ok, notification} <- Notification.read_one(user, notification_id) do
conn