projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
085d4e6
)
Make pagination type conditional
author
Mark Felder
<feld@feld.me>
Wed, 30 Dec 2020 22:37:04 +0000
(16:37 -0600)
committer
Mark Felder
<feld@feld.me>
Wed, 30 Dec 2020 22:37:04 +0000
(16:37 -0600)
lib/pleroma/web/activity_pub/activity_pub.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/activity_pub/activity_pub.ex
b/lib/pleroma/web/activity_pub/activity_pub.ex
index f82f34de5919a935ad96cefc362cca331703568a..68494f04708a18948d940c512a097ef99c77f1c9 100644
(file)
--- 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