Mastodon API context fix.
authorlain <lain@soykaf.club>
Sun, 25 Feb 2018 20:25:33 +0000 (21:25 +0100)
committerlain <lain@soykaf.club>
Sun, 25 Feb 2018 20:25:33 +0000 (21:25 +0100)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index ca1f8154c69647f110987167690f8d772c829838..fbf8c191521971f9ec57e2379b2445c0a4675bbc 100644 (file)
@@ -202,7 +202,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
 
   def get_context(%{assigns: %{user: user}} = conn, %{"id" => id}) do
     with %Activity{} = activity <- Repo.get(Activity, id),
-         activities <- ActivityPub.fetch_activities_for_context(activity.data["object"]["context"], %{"blocking_user" => user, "user" => user}),
+         activities <- ActivityPub.fetch_activities_for_context(activity.data["context"], %{"blocking_user" => user, "user" => user}),
          activities <- activities |> Enum.filter(fn (%{id: aid}) -> to_string(aid) != to_string(id) end),
          activities <- activities |> Enum.filter(fn (%{data: %{"type" => type}}) -> type == "Create" end),
          grouped_activities <- Enum.group_by(activities, fn (%{id: id}) -> id < activity.id end) do