Browse Source

rm

develop
Dashie der otter 1 year ago
parent
commit
cff1f2bb87
2 changed files with 1 additions and 26 deletions
  1. +0
    -26
      lib/pleroma/web/activity_pub/mrf/user_disallowlist.ex
  2. +1
    -0
      update.sh

+ 0
- 26
lib/pleroma/web/activity_pub/mrf/user_disallowlist.ex View File

@@ -1,26 +0,0 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Web.ActivityPub.MRF.UserDisallowListPolicy do
alias Pleroma.Config

@behaviour Pleroma.Web.ActivityPub.MRF

defp filter_by_list(object, []), do: {:ok, object}

defp filter_by_list(object, disallow_list) do
cond do
Enum.any?(disallow_list, fn x -> x in object["to"] end) -> {:reject, nil}
Enum.any?(disallow_list, fn x -> x in object["cc"] end) -> {:reject, nil}
true -> {:ok, object}
end
end

@impl true
def filter(object) do
disallow_list = Config.get([:mrf_user_disallowlist], [])

filter_by_list(object, disallow_list)
end
end

+ 1
- 0
update.sh View File

@@ -1,3 +1,4 @@
set -x
mix local.hex --force
mix deps.get
mix local.rebar --force


Loading…
Cancel
Save