Ensure we only apply NSFW Simple policy on parsable objects
authorMark Felder <feld@FreeBSD.org>
Fri, 11 Sep 2020 21:59:45 +0000 (16:59 -0500)
committerMark Felder <feld@FreeBSD.org>
Sat, 12 Sep 2020 04:22:14 +0000 (23:22 -0500)
lib/pleroma/web/activity_pub/mrf/simple_policy.ex

index bb193475ab12a47f0aa6967584368b36b3373f33..16117772717091489ae3c7b5fa0b76e651bad7ab 100644 (file)
@@ -66,7 +66,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
            "type" => "Create",
            "object" => child_object
          } = object
-       ) do
+       )
+       when is_map(child_object) do
     media_nsfw =
       Config.get([:mrf_simple, :media_nsfw])
       |> MRF.subdomains_regex()