alias Pleroma.Web.PleromaAPI.ChatView
import Ecto.Query
- import Pleroma.Web.ActivityPub.ObjectValidator, only: [stringify_keys: 1]
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
cm_refs =
chat
|> MessageReference.for_chat_query()
- |> Pagination.fetch_paginated(params |> stringify_keys())
+ |> Pagination.fetch_paginated(params)
conn
|> put_view(MessageReferenceView)
end
end
- def index(%{assigns: %{user: %{id: user_id} = user}} = conn, params) do
+ def index(%{assigns: %{user: %{id: user_id} = user}} = conn, _params) do
blocked_ap_ids = User.blocked_users_ap_ids(user)
chats =
where: c.recipient not in ^blocked_ap_ids,
order_by: [desc: c.updated_at]
)
- |> Pagination.fetch_paginated(params |> stringify_keys)
+ |> Repo.all()
conn
|> put_view(ChatView)