Add actor to objects.

This commit is contained in:
Roger Braun 2017-04-13 14:56:19 +02:00
parent d2bf099ae6
commit 1ccbe562c9
2 changed files with 3 additions and 1 deletions

View 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

View 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")