diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 4b2ecfa3c..f7f6d047e 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -56,7 +56,8 @@ def stream_out(activity) do !Enum.member?( activity.data["to"], User.get_by_ap_id(activity.data["actor"]).follower_address - ), do: Pleroma.Web.Streamer.stream("direct", activity) + ), + do: Pleroma.Web.Streamer.stream("direct", activity) end end end diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 301234412..d1d48cd0a 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -193,11 +193,18 @@ def get_visibility(object) do cc = object["cc"] || [] cond do - public in to -> "public" - public in cc -> "unlisted" - # this should use the sql for the object's activity - Enum.any?(to, &String.contains?(&1, "/followers")) -> "private" - true -> "direct" + public in to -> + "public" + + public in cc -> + "unlisted" + + # this should use the sql for the object's activity + Enum.any?(to, &String.contains?(&1, "/followers")) -> + "private" + + true -> + "direct" end end end