Update types in mrf config description

This commit is contained in:
Angelina Filippova 2021-07-10 19:08:16 +03:00
parent fe263d0d00
commit 9d56f2717c
8 changed files with 21 additions and 21 deletions

View File

@ -18,7 +18,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do
children: [
%{
key: :policies,
type: [:module, {:list, :module}],
type: {:multiple_select, :reduced_labels},
description:
"A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF}
@ -33,7 +33,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do
%{
key: :transparency_exclusions,
label: "MRF transparency exclusions",
type: {:list, :string},
type: :multiple_select,
description:
"Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
suggestions: [

View File

@ -138,7 +138,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.KeywordPolicy do
children: [
%{
key: :reject,
type: {:list, :string},
type: :multiple_select,
description: """
A list of patterns which result in message being rejected.
@ -148,7 +148,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.KeywordPolicy do
},
%{
key: :federated_timeline_removal,
type: {:list, :string},
type: :multiple_select,
description: """
A list of patterns which result in message being removed from federated timelines (a.k.a unlisted).
@ -158,7 +158,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.KeywordPolicy do
},
%{
key: :replace,
type: {:list, :tuple},
type: {:keyword, :string},
description: """
**Pattern**: a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`.

View File

@ -36,7 +36,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.MentionPolicy do
children: [
%{
key: :actors,
type: {:list, :string},
type: :multiple_select,
description: "A list of actors for which any post mentioning them will be dropped",
suggestions: ["actor1", "actor2"]
}

View File

@ -36,7 +36,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkup do
children: [
%{
key: :scrub_policy,
type: :module,
type: :select,
suggestions: [Pleroma.HTML.Scrubber.Default]
}
]

View File

@ -124,7 +124,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
},
%{
key: :actions,
type: {:list, :atom},
type: :multiple_select,
description:
"A list of actions to apply to the post. `:delist` removes the post from public timelines; " <>
"`:strip_followers` removes followers from the ActivityPub recipient list ensuring they won't be delivered to home timelines; " <>

View File

@ -255,63 +255,63 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
children: [
%{
key: :media_removal,
type: {:list, :string},
type: :multiple_select,
description: "List of instances to strip media attachments from",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :media_nsfw,
label: "Media NSFW",
type: {:list, :string},
type: :multiple_select,
description: "List of instances to tag all media as NSFW (sensitive) from",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :federated_timeline_removal,
type: {:list, :string},
type: :multiple_select,
description:
"List of instances to remove from the Federated (aka The Whole Known Network) Timeline",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :reject,
type: {:list, :string},
type: :multiple_select,
description: "List of instances to reject activities from (except deletes)",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :accept,
type: {:list, :string},
type: :multiple_select,
description: "List of instances to only accept activities from (except deletes)",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :followers_only,
type: {:list, :string},
type: :multiple_select,
description: "Force posts from the given instances to be visible by followers only",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :report_removal,
type: {:list, :string},
type: :multiple_select,
description: "List of instances to reject reports from",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :avatar_removal,
type: {:list, :string},
type: :multiple_select,
description: "List of instances to strip avatars from",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :banner_removal,
type: {:list, :string},
type: :multiple_select,
description: "List of instances to strip banners from",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :reject_deletes,
type: {:list, :string},
type: :multiple_select,
description: "List of instances to reject deletions from",
suggestions: ["example.com", "*.example.com"]
}

View File

@ -52,7 +52,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SubchainPolicy do
children: [
%{
key: :match_actor,
type: {:map, {:list, :string}},
type: {:map, :multiple_select},
description: "Matches a series of regular expressions against the actor field",
suggestions: [
%{

View File

@ -51,14 +51,14 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicy do
children: [
%{
key: :accept,
type: {:list, :string},
type: :multiple_select,
description:
"A list of ActivityStreams terms to accept. If empty, all supported messages are accepted.",
suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
},
%{
key: :reject,
type: {:list, :string},
type: :multiple_select,
description:
"A list of ActivityStreams terms to reject. If empty, no messages are rejected.",
suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]