import Pleroma.Web.ControllerHelper, only: [add_link_headers: 7]
alias Pleroma.Conversation.Participation
- alias Pleroma.Repo
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.MastodonAPI.ConversationView
alias Pleroma.Web.MastodonAPI.StatusView
participation =
participation_id
- |> Participation.get()
- |> Repo.preload(:conversation)
+ |> Participation.get(preload: [:conversation])
if user.id == participation.user_id do
activities =
|> Participation.get()
with true <- user.id == participation.user_id,
- {:ok, _} <- Participation.set_recipients(participation, recipients) do
+ {:ok, participation} <- Participation.set_recipients(participation, recipients) do
conn
|> put_view(ConversationView)
|> render("participation.json", %{participation: participation, for: user})