Make NormalizeMarkup history-aware

This commit is contained in:
Tusooa Zhu 2022-07-23 22:50:38 -04:00
commit 46a5c06853
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 52 additions and 13 deletions

View file

@ -9,7 +9,11 @@ defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkup do
@behaviour Pleroma.Web.ActivityPub.MRF.Policy
@impl true
def filter(%{"type" => "Create", "object" => child_object} = object) do
def history_awareness, do: :auto
@impl true
def filter(%{"type" => type, "object" => child_object} = object)
when type in ["Create", "Update"] do
scrub_policy = Pleroma.Config.get([:mrf_normalize_markup, :scrub_policy])
content =