Fix atom feed pagination.
authorlain <lain@soykaf.club>
Mon, 26 Mar 2018 07:51:43 +0000 (09:51 +0200)
committerlain <lain@soykaf.club>
Mon, 26 Mar 2018 07:51:43 +0000 (09:51 +0200)
lib/pleroma/web/ostatus/ostatus_controller.ex

index cb435e0313aa4811bb4ced3b8ed74c2509c75f7b..7e71c156c3cb5c001f8ade1e818c223edbcfe06e 100644 (file)
@@ -23,7 +23,10 @@ defmodule Pleroma.Web.OStatus.OStatusController do
   def feed(conn, %{"nickname" => nickname} = params) do
     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
 
     response = user