mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 02:05:12 +00:00
Return visilility in twitter api, too.
This commit is contained in:
parent
434601a5c3
commit
ff007af0c2
|
@ -262,7 +262,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||
"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
|
||||
|
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
|
|||
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)
|
||||
|
||||
|
@ -47,7 +47,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
|
|||
"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
|
||||
|
|
Loading…
Reference in a new issue