From: Roger Braun Date: Thu, 13 Apr 2017 12:56:19 +0000 (+0200) Subject: Add actor to objects. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=1ccbe562c950e588e24822d20f802dd99b01bd79;p=akkoma Add actor to objects. --- diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex index 0217b28d6..a195301ee 100644 --- a/lib/pleroma/web/twitter_api/twitter_api.ex +++ b/lib/pleroma/web/twitter_api/twitter_api.ex @@ -37,7 +37,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do "content" => content_html, "published" => date, "context" => context, - "attachment" => attachments + "attachment" => attachments, + "actor" => user.ap_id }, "published" => date, "context" => context diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs index e8853a910..a4c9bd7e7 100644 --- a/test/web/twitter_api/twitter_api_test.exs +++ b/test/web/twitter_api/twitter_api_test.exs @@ -32,6 +32,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do assert get_in(activity.data, ["object", "content"]) == "Hello again, @shp." assert get_in(activity.data, ["object", "type"]) == "Note" + assert get_in(activity.data, ["object", "actor"]) == user.ap_id assert get_in(activity.data, ["actor"]) == user.ap_id assert Enum.member?(get_in(activity.data, ["to"]), User.ap_followers(user)) assert Enum.member?(get_in(activity.data, ["to"]), "https://www.w3.org/ns/activitystreams#Public")