Formatting
authorcsaurus <csaurus@mailbox.org>
Sun, 13 May 2018 19:36:41 +0000 (15:36 -0400)
committercsaurus <csaurus@mailbox.org>
Sun, 13 May 2018 19:36:41 +0000 (15:36 -0400)
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/mastodon_api/views/status_view.ex

index 4b2ecfa3c251faa41a91a1eec2502bdcfbee349f..f7f6d047e7a28f668dceaa156a35d0c7e1f41a56 100644 (file)
@@ -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
index 3012344121240b3737272c3336b159a09b956985..d1d48cd0aacbdd2c3a5be46abfe4e8cb7af27fc5 100644 (file)
@@ -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