"external_url" => object["external_url"] || object["id"],
"tags" => tags,
"activity_type" => "post",
- "possibly_sensitive" => possibly_sensitive
+ "possibly_sensitive" => possibly_sensitive,
+ "visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object)
}
end
end
user = insert(:user)
other_user = insert(:user, %{nickname: "shp"})
- {:ok, activity} = CommonAPI.post(user, %{"status" => "Hey @shp!"})
+ {:ok, activity} = CommonAPI.post(user, %{"status" => "Hey @shp!", "visibility" => "direct"})
result = ActivityView.render("activity.json", activity: activity)
"tags" => [],
"text" => "Hey @shp!",
"uri" => activity.data["object"]["id"],
- "user" => UserView.render("show.json", %{user: user})
+ "user" => UserView.render("show.json", %{user: user}),
+ "visibility" => "direct"
}
assert result == expected