ChatController: Handle pagination.
[akkoma] / lib / pleroma / web / router.ex
index 5f5ec1c81c3673b5074fd93fe086341004e9fe1b..b10bf4466164c66857238168fc0ef21e9f26f75e 100644 (file)
@@ -284,6 +284,15 @@ defmodule Pleroma.Web.Router do
   end
 
   scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
+    scope [] do
+      pipe_through(:authenticated_api)
+
+      post("/chats/by-ap-id/:ap_id", ChatController, :create)
+      get("/chats", ChatController, :index)
+      get("/chats/:id/messages", ChatController, :messages)
+      post("/chats/:id/messages", ChatController, :post_chat_message)
+    end
+
     scope [] do
       pipe_through(:authenticated_api)