1 defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublic do
3 @behaviour Pleroma.Web.ActivityPub.MRF
7 if object["type"] == "Create" do
8 user = User.get_by_ap_id(object["actor"])
9 public = "https://www.w3.org/ns/activitystreams#Public"
11 # Determine visibility
14 public in object["to"] -> "public"
15 public in object["cc"] -> "unlisted"
16 user.follower_address in object["to"] -> "followers"
22 "public" -> {:ok, object}
23 "unlisted" -> {:ok, object}