limit: 5000,
upload_limit: 16_000_000,
registrations_open: true,
- federating: true
+ federating: true,
+ rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy
config :pleroma, :media_proxy,
enabled: false,
@httpoison Application.get_env(:pleroma, :httpoison)
+ @instance Application.get_env(:pleroma, :instance)
+ @rewrite_policy Keyword.get(@instance, :rewrite_policy)
+
def get_recipients(data) do
(data["to"] || []) ++ (data["cc"] || [])
end
def insert(map, local \\ true) when is_map(map) do
with nil <- Activity.get_by_ap_id(map["id"]),
map <- lazy_put_activity_defaults(map),
- :ok <- insert_full_object(map) do
+ :ok <- insert_full_object(map),
+ {:ok, map} <- @rewrite_policy.filter(map) do
{:ok, activity} =
Repo.insert(%Activity{
data: map,