diff options
author | lain <lain@soykaf.club> | 2019-09-19 16:53:59 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-09-19 16:53:59 +0000 |
commit | b80c41a14f5b621311971469c663903e13ad3a33 (patch) | |
tree | 679ca9675ecbc1030a7666c9cf661245e63f9c3f /lib | |
parent | 9c8a94bae226bfff65a0c4ec265b593226e1f912 (diff) | |
parent | 9aca2cc95d0d8886d35be17e5cdd683004b425d9 (diff) | |
download | pleroma-b80c41a14f5b621311971469c663903e13ad3a33.tar.gz pleroma-b80c41a14f5b621311971469c663903e13ad3a33.zip |
Merge branch 'outbox_pagination' into 'develop'
Fix AP outbox pagination
See merge request pleroma/pleroma!1700
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/views/user_view.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/views/user_view.ex b/lib/pleroma/web/activity_pub/views/user_view.ex index 164b973d0..a2f73e140 100644 --- a/lib/pleroma/web/activity_pub/views/user_view.ex +++ b/lib/pleroma/web/activity_pub/views/user_view.ex @@ -227,11 +227,12 @@ defmodule Pleroma.Web.ActivityPub.UserView do activities = ActivityPub.fetch_user_activities(user, nil, params) + # this is sorted chronologically, so first activity is the newest (max) {max_id, min_id, collection} = if length(activities) > 0 do { - Enum.at(Enum.reverse(activities), 0).id, Enum.at(activities, 0).id, + Enum.at(Enum.reverse(activities), 0).id, Enum.map(activities, fn act -> {:ok, data} = Transmogrifier.prepare_outgoing(act.data) data |