Add actor to objects.
authorRoger Braun <roger@rogerbraun.net>
Thu, 13 Apr 2017 12:56:19 +0000 (14:56 +0200)
committerRoger Braun <roger@rogerbraun.net>
Thu, 13 Apr 2017 12:56:19 +0000 (14:56 +0200)
lib/pleroma/web/twitter_api/twitter_api.ex
test/web/twitter_api/twitter_api_test.exs

index 0217b28d64139a815636f36a3908b3e1605fd732..a195301ee27df99521097312d52beadb4bca1eec 100644 (file)
@@ -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
index e8853a9100c249f05aaa98f2c06376ec09934398..a4c9bd7e72b580ec472985ef3bdc258ee5226e60 100644 (file)
@@ -32,6 +32,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
 
     assert get_in(activity.data, ["object", "content"]) == "Hello again, <a href='shp'>@shp</a>."
     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")