Add link headers in ChatController.index2
authormarcin mikołajczak <git@mkljczk.pl>
Sun, 12 Dec 2021 16:43:18 +0000 (17:43 +0100)
committermarcin mikołajczak <git@mkljczk.pl>
Sun, 12 Dec 2021 16:43:18 +0000 (17:43 +0100)
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
lib/pleroma/web/pleroma_api/controllers/chat_controller.ex

index dcd54b1afccdcadad2ab1755e0831cae57721af9..669d50132c584e34760c2fb9712b9d64df83f67f 100644 (file)
@@ -151,7 +151,9 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
       index_query(user, params)
       |> Pagination.fetch_paginated(params)
 
-    render(conn, "index.json", chats: chats)
+    conn
+    |> add_link_headers(chats)
+    |> render("index.json", chats: chats)
   end
 
   defp index_query(%{id: user_id} = user, params) do