From 96473dfac02d901e5b915ca56a34ce67b30c10d5 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 10 Sep 2017 10:49:15 +0200 Subject: [PATCH] Reverse mastodon timeline data. --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.45.2