Preserve parameters in link headers (Mastodon API)

This commit is contained in:
eugenijm 2019-03-07 05:29:42 +03:00
commit 7342b5a45f
2 changed files with 37 additions and 0 deletions

View file

@ -190,6 +190,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
defp add_link_headers(conn, method, activities, param \\ nil, params \\ %{}) do
params =
conn.params
|> Map.drop(["since_id", "max_id"])
|> Map.merge(params)
last = List.last(activities)
first = List.first(activities)