From: Roger Braun Date: Sun, 10 Sep 2017 08:49:15 +0000 (+0200) Subject: Reverse mastodon timeline data. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=96473dfac02d901e5b915ca56a34ce67b30c10d5;p=akkoma Reverse mastodon timeline data. --- 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