aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex3
-rw-r--r--lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex2
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api.ex4
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index eeb826814..8f07638cd 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -556,6 +556,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
q
|> restrict_unlisted()
|> Pagination.fetch_paginated(opts)
+ |> Map.get(:items)
|> Enum.reverse()
end
@@ -953,6 +954,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
fetch_activities_query(recipients ++ list_memberships, opts)
|> Pagination.fetch_paginated(opts)
+ |> Map.get(:items)
|> Enum.reverse()
|> maybe_update_cc(list_memberships, opts["user"])
end
@@ -987,6 +989,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
fetch_activities_query([], opts)
|> fetch_activities_bounded_query(recipients, recipients_with_public)
|> Pagination.fetch_paginated(opts)
+ |> Map.get(:items)
|> Enum.reverse()
end
diff --git a/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex
index 83e877c0e..d532ba685 100644
--- a/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex
@@ -420,6 +420,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
[user.ap_id]
|> ActivityPub.fetch_activities_query(params)
|> Pagination.fetch_paginated(params)
+ |> Map.get(:items)
conn
|> add_link_headers(:dm_timeline, activities)
@@ -1194,6 +1195,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
bookmarks =
Bookmark.for_user_query(user.id)
|> Pagination.fetch_paginated(params)
+ |> Map.get(:items)
activities =
bookmarks
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api.ex b/lib/pleroma/web/mastodon_api/mastodon_api.ex
index ac01d1ff3..cf3962944 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api.ex
@@ -45,12 +45,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPI do
user
|> User.get_followers_query()
|> Pagination.fetch_paginated(params)
+ |> Map.get(:items)
end
def get_friends(user, params \\ %{}) do
user
|> User.get_friends_query()
|> Pagination.fetch_paginated(params)
+ |> Map.get(:items)
end
def get_notifications(user, params \\ %{}) do
@@ -60,12 +62,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPI do
|> Notification.for_user_query(options)
|> restrict(:exclude_types, options)
|> Pagination.fetch_paginated(params)
+ |> Map.get(:items)
end
def get_scheduled_activities(user, params \\ %{}) do
user
|> ScheduledActivity.for_user_query()
|> Pagination.fetch_paginated(params)
+ |> Map.get(:items)
end
defp cast_params(params) do