diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-09-10 10:49:15 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-09-10 10:49:15 +0200 |
commit | 96473dfac02d901e5b915ca56a34ce67b30c10d5 (patch) | |
tree | f45ea1b16aaefdb53e9d3043228c8fe680d374ae /lib | |
parent | e8975d06bed653f362777ee7046f8bb0129e461e (diff) | |
download | pleroma-96473dfac02d901e5b915ca56a34ce67b30c10d5.tar.gz |
Reverse mastodon timeline data.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index c81d58d64..4401a37a3 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -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 |