diff options
author | csaurus <csaurus@mailbox.org> | 2018-05-13 15:36:41 -0400 |
---|---|---|
committer | csaurus <csaurus@mailbox.org> | 2018-05-13 15:36:41 -0400 |
commit | 2ce48c1a42b0e61958b513df610a81bb89b4254a (patch) | |
tree | c00f098748b199bdbf6fa8402aca74085e11b8d7 | |
parent | 9aabff48835d55cf284229298ad86c07fa1fce30 (diff) | |
download | pleroma-2ce48c1a42b0e61958b513df610a81bb89b4254a.tar.gz |
Formatting
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 3 | ||||
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 17 |
2 files changed, 14 insertions, 6 deletions
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 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub 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 @@ defmodule Pleroma.Web.MastodonAPI.StatusView 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 |