more formatting
authorsquidboi <squidboi@waifu.club>
Fri, 8 Jun 2018 05:03:24 +0000 (22:03 -0700)
committersquidboi <squidboi@waifu.club>
Fri, 8 Jun 2018 05:03:24 +0000 (22:03 -0700)
lib/pleroma/web/activity_pub/mrf/reject_non_public.ex

index 9719a48d575d17de171fa28c51c620b80bb971bc..c1d25f48857536a7446ede9e7ba425963d76f812 100644 (file)
@@ -10,20 +10,16 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublic do
       #Determine visibility
       visibility =
         cond do
-          #Public
-          public in object["to"] -> "p"
-          #Unlisted
-          public in object["cc"] -> "u"
-          #Followers-only
-          user.follower_address in object["to"] -> "f"
-          #Direct
-          true -> "d"
+          public in object["to"] -> "public"
+          public in object["cc"] -> "unlisted"
+          user.follower_address in object["to"] -> "followers"
+          true -> "direct"
         end
 
       {flag, object_out} =
         case visibility do
-          "p" -> {:ok, object}
-          "u" -> {:ok, object}
+          "public" -> {:ok, object}
+          "unlisted" -> {:ok, object}
           _ -> {:reject, nil}
         end