mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-19 16:10:59 +00:00
Reverse mastodon timeline data.
This commit is contained in:
parent
e8975d06be
commit
96473dfac0
1 changed files with 2 additions and 0 deletions
|
@ -40,6 +40,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
|
||||
def home_timeline(%{assigns: %{user: user}} = conn, params) do
|
||||
activities = ActivityPub.fetch_activities([user.ap_id | user.following], Map.put(params, "type", "Create"))
|
||||
|> Enum.reverse
|
||||
render conn, StatusView, "index.json", %{activities: activities, for: user, as: :activity}
|
||||
end
|
||||
|
||||
|
@ -49,6 +50,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
|> Map.put("local_only", !!params["local"])
|
||||
|
||||
activities = ActivityPub.fetch_public_activities(params)
|
||||
|> Enum.reverse
|
||||
|
||||
render conn, StatusView, "index.json", %{activities: activities, for: user, as: :activity}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue