Fix MRF policies to also work with Update
[akkoma] / lib / pleroma / web / activity_pub / mrf / normalize_markup.ex
index 0d71467387a98793606b3b7496792f71de996ef4..151c6ed2053a7d8a281b13c15d9a5f5ded77a672 100644 (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 =