Reverse mastodon timeline data.
authorRoger Braun <roger@rogerbraun.net>
Sun, 10 Sep 2017 08:49:15 +0000 (10:49 +0200)
committerRoger Braun <roger@rogerbraun.net>
Sun, 10 Sep 2017 08:49:15 +0000 (10:49 +0200)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index c81d58d645027ca6d8774010bda4fb37dc9121b5..4401a37a39dab3645e96673e0130902143c8a343 100644 (file)
@@ -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