Add actor to objects.
This commit is contained in:
parent
d2bf099ae6
commit
1ccbe562c9
|
@ -37,7 +37,8 @@ def create_status(user = %User{}, data = %{}) do
|
||||||
"content" => content_html,
|
"content" => content_html,
|
||||||
"published" => date,
|
"published" => date,
|
||||||
"context" => context,
|
"context" => context,
|
||||||
"attachment" => attachments
|
"attachment" => attachments,
|
||||||
|
"actor" => user.ap_id
|
||||||
},
|
},
|
||||||
"published" => date,
|
"published" => date,
|
||||||
"context" => context
|
"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", "content"]) == "Hello again, <a href='shp'>@shp</a>."
|
||||||
assert get_in(activity.data, ["object", "type"]) == "Note"
|
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 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"]), User.ap_followers(user))
|
||||||
assert Enum.member?(get_in(activity.data, ["to"]), "https://www.w3.org/ns/activitystreams#Public")
|
assert Enum.member?(get_in(activity.data, ["to"]), "https://www.w3.org/ns/activitystreams#Public")
|
||||||
|
|
Loading…
Reference in a new issue