From 2ce48c1a42b0e61958b513df610a81bb89b4254a Mon Sep 17 00:00:00 2001 From: csaurus Date: Sun, 13 May 2018 15:36:41 -0400 Subject: [PATCH] Formatting --- lib/pleroma/web/activity_pub/activity_pub.ex | 3 ++- 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