X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fmrf%2Fvocabulary_policy.ex;h=6167a74e209fcf7940cdfc4d0836c08d23a9f3f2;hb=372533b7c3bcd2846cdb8f6cfb0cb748049c76b5;hp=9a03d67c0b9e481995ccbe0173701eb30770018d;hpb=2753285b7722fdb47f0ebb2180e997cf72f65d1a;p=akkoma
diff --git a/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex b/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex
index 9a03d67c0..6167a74e2 100644
--- a/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex
+++ b/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicy do
@@ -19,7 +19,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicy do
def filter(%{"type" => message_type} = message) do
with accepted_vocabulary <- Pleroma.Config.get([:mrf_vocabulary, :accept]),
rejected_vocabulary <- Pleroma.Config.get([:mrf_vocabulary, :reject]),
- true <- accepted_vocabulary == [] || Enum.member?(accepted_vocabulary, message_type),
+ true <-
+ Enum.empty?(accepted_vocabulary) || Enum.member?(accepted_vocabulary, message_type),
false <-
length(rejected_vocabulary) > 0 && Enum.member?(rejected_vocabulary, message_type),
{:ok, _} <- filter(message["object"]) do