summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreugenijm <eugenijm@protonmail.com>2019-03-07 05:29:42 +0300
committereugenijm <eugenijm@protonmail.com>2019-03-07 09:12:16 +0300
commit7342b5a45f8a31fe33dac21123d707071531aa95 (patch)
tree1aefd007cb762909dae807f400c6477f8dee9508 /lib
parent0fe715f3ba0f787154ab8e86c8745d7f09affdcb (diff)
downloadpleroma-7342b5a45f8a31fe33dac21123d707071531aa95.tar.gz
pleroma-7342b5a45f8a31fe33dac21123d707071531aa95.zip
Preserve parameters in link headers (Mastodon API)
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 4fe66f856..8c58f4545 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -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)