Chats: Introduce /api/v2/pleroma/chats which implements pagination

Also removes incorrect claim that /api/v1/pleroma/chats supports
pagination and deprecates it.

Closes #2140
This commit is contained in:
rinpatch 2021-02-17 15:58:33 +03:00
commit d7ad288c84
5 changed files with 196 additions and 127 deletions

View file

@ -411,6 +411,13 @@ defmodule Pleroma.Web.Router do
get("/federation_status", InstancesController, :show)
end
scope "/api/v2/pleroma", Pleroma.Web.PleromaAPI do
scope [] do
pipe_through(:authenticated_api)
get("/chats", ChatController, :index2)
end
end
scope "/api/v1", Pleroma.Web.MastodonAPI do
pipe_through(:authenticated_api)