aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIlja <domainepublic@spectraltheorem.be>2020-12-26 11:35:05 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2021-08-06 07:59:53 +0200
commitb0926a71b288249f1e318493f3f67674ddb8e12c (patch)
tree88314acb3885eed12f33841a3e7f0240f45414e6 /lib
parentf4028c908c56736b88caa5edb71f5aad21244de1 (diff)
downloadpleroma-b0926a71b288249f1e318493f3f67674ddb8e12c.tar.gz
Make transparency_exclusions use tuples in admin-fe
* Make it use tuples * I also changed the keys for key_placeholder and value_placeholder to use snake_case instead of camelCase
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/mrf.ex6
-rw-r--r--lib/pleroma/web/activity_pub/mrf/keyword_policy.ex4
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/pleroma/web/activity_pub/mrf.ex b/lib/pleroma/web/activity_pub/mrf.ex
index 5ac4f9f20..23ea039c3 100644
--- a/lib/pleroma/web/activity_pub/mrf.ex
+++ b/lib/pleroma/web/activity_pub/mrf.ex
@@ -33,9 +33,11 @@ defmodule Pleroma.Web.ActivityPub.MRF do
%{
key: :transparency_exclusions,
label: "MRF transparency exclusions",
- type: {:list, :string},
+ type: {:list, :tuple},
+ key_placeholder: "instance",
+ value_placeholder: "reason",
description:
- "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
+ "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value. You can also provide a reason for excluding these instance names. The instances and reasons won't be publicly disclosed.",
suggestions: [
"exclusion.com"
]
diff --git a/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex b/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex
index aebf78b46..1383fa757 100644
--- a/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex
+++ b/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex
@@ -159,8 +159,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.KeywordPolicy do
%{
key: :replace,
type: {:list, :tuple},
- keyPlaceholder: "pattern",
- valuePlaceholder: "replacement",
+ key_placeholder: "instance",
+ value_placeholder: "reason",
description: """
**Pattern**: a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`.