Fix atom feed pagination.

This commit is contained in:
lain 2018-03-26 09:51:43 +02:00
parent 2c1c221301
commit 46f63ea8af

View file

@ -23,7 +23,10 @@ def feed_redirect(conn, %{"nickname" => nickname} = params) do
def feed(conn, %{"nickname" => nickname} = params) do def feed(conn, %{"nickname" => nickname} = params) do
user = User.get_cached_by_nickname(nickname) user = User.get_cached_by_nickname(nickname)
activities = ActivityPub.fetch_public_activities(%{"whole_db" => true, "actor_id" => user.ap_id}) query_params = Map.take(params, ["max_id"])
|> Map.merge(%{"whole_db" => true, "actor_id" => user.ap_id})
activities = ActivityPub.fetch_public_activities(query_params)
|> Enum.reverse |> Enum.reverse
response = user response = user