ChatController: Handle pagination.
[akkoma] / lib / pleroma / web / router.ex
index 368e77d3e809cef41e03a445c47480b6ba2cee44..b10bf4466164c66857238168fc0ef21e9f26f75e 100644 (file)
@@ -290,6 +290,7 @@ defmodule Pleroma.Web.Router do
       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
@@ -360,9 +361,11 @@ defmodule Pleroma.Web.Router do
 
     get("/notifications", NotificationController, :index)
     get("/notifications/:id", NotificationController, :show)
+    post("/notifications/:id/dismiss", NotificationController, :dismiss)
     post("/notifications/clear", NotificationController, :clear)
-    post("/notifications/dismiss", NotificationController, :dismiss)
     delete("/notifications/destroy_multiple", NotificationController, :destroy_multiple)
+    # Deprecated: was removed in Mastodon v3, use `/notifications/:id/dismiss` instead
+    post("/notifications/dismiss", NotificationController, :dismiss)
 
     get("/scheduled_statuses", ScheduledActivityController, :index)
     get("/scheduled_statuses/:id", ScheduledActivityController, :show)