diff options
author | Mark Felder <feld@feld.me> | 2020-12-30 16:37:04 -0600 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2020-12-30 16:37:04 -0600 |
commit | 2597b028f797c74eb16e7cd5bfc251dfe03ad934 (patch) | |
tree | 393d606621ca2f72d3f7423fb2eaf6e0cb6c640b /lib | |
parent | 085d4e6cfcdecd967cbe6716d06d1ace0108a11a (diff) | |
download | pleroma-2597b028f797c74eb16e7cd5bfc251dfe03ad934.tar.gz |
Make pagination type conditional
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index f82f34de5..68494f047 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -603,12 +603,18 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do |> Map.put(:muting_user, reading_user) end + pagination_type = + cond do + is_nil(params[:offset]) -> :keyset + true -> :offset + end + %{ godmode: params[:godmode], reading_user: reading_user } |> user_activities_recipients() - |> fetch_activities(params, :offset) + |> fetch_activities(params, pagination_type) |> Enum.reverse() end |