mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Make pagination type conditional
This commit is contained in:
parent
085d4e6cfc
commit
2597b028f7
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue