Commit 1ccbe562 authored by lain's avatar lain
Browse files

Add actor to objects.

parent d2bf099a
......@@ -37,7 +37,8 @@ def create_status(user = %User{}, data = %{}) do
"content" => content_html,
"published" => date,
"context" => context,
"attachment" => attachments
"attachment" => attachments,
"actor" => user.ap_id
},
"published" => date,
"context" => context
......
......@@ -32,6 +32,7 @@ test "create a status" 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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment