From 33e62856367b2789fa287830676edd843ad0e5d4 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Thu, 9 Jul 2020 01:33:23 +0300 Subject: [PATCH 1/6] Update types for :headers and :options settings in MediaProxy Invalidation group --- config/description.exs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/config/description.exs b/config/description.exs index 370af80a6..337f0d307 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1791,15 +1791,20 @@ config :pleroma, :config_description, [ }, %{ key: :headers, - type: {:list, :tuple}, - description: "HTTP headers of request.", + type: {:keyword, :string}, + description: "HTTP headers of request", suggestions: [{"x-refresh", 1}] }, %{ key: :options, type: :keyword, - description: "Request options.", - suggestions: [params: %{ts: "xxx"}] + description: "Request options", + children: [ + %{ + key: :params, + type: {:keyword, :string} + } + ] } ] }, From 6b9210e886e16f806563f20ac82c0fe56f12a615 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Fri, 10 Jul 2020 03:07:55 +0300 Subject: [PATCH 2/6] Update type for :groups setting --- config/description.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/description.exs b/config/description.exs index 337f0d307..c2cd40587 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2527,7 +2527,7 @@ config :pleroma, :config_description, [ %{ key: :styling, type: :map, - description: "a map with color settings for email templates.", + description: "A map with color settings for email templates.", suggestions: [ %{ link_color: "#d8a070", @@ -2633,7 +2633,7 @@ config :pleroma, :config_description, [ }, %{ key: :groups, - type: {:keyword, :string, {:list, :string}}, + type: {:keyword, {:list, :string}}, description: "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <> " and the value is the location or array of locations. * can be used as a wildcard.", From ac9f18de11d3d0583dfae3c6b25c56828357624a Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Fri, 10 Jul 2020 03:32:53 +0300 Subject: [PATCH 3/6] Update type for :replace settings --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/description.exs b/config/description.exs index c2cd40587..0a0a8e95c 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1601,7 +1601,7 @@ config :pleroma, :config_description, [ }, %{ key: :replace, - type: [{:tuple, :string, :string}, {:tuple, :regex, :string}], + type: {:keyword, :string, :regex}, description: "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.", suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}] From 02b2747d420962445691d4bdbe171d95e7656e89 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sat, 11 Jul 2020 04:17:21 +0300 Subject: [PATCH 4/6] Update types for :params, :match_actor and :replace settings --- config/description.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/description.exs b/config/description.exs index 0a0a8e95c..7f3ef535c 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1521,7 +1521,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :match_actor, - type: :map, + type: {:map, {:list, :string}}, description: "Matches a series of regular expressions against the actor field", suggestions: [ %{ @@ -1601,7 +1601,7 @@ config :pleroma, :config_description, [ }, %{ key: :replace, - type: {:keyword, :string, :regex}, + type: {:list, :tuple}, description: "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.", suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}] @@ -1802,7 +1802,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :params, - type: {:keyword, :string} + type: {:map, :string} } ] } From 98c56ff4771cba8037fd28d412337bee7a60bc95 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sat, 11 Jul 2020 04:32:44 +0300 Subject: [PATCH 5/6] Remove :regex from types --- config/description.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/description.exs b/config/description.exs index 7f3ef535c..6ef329807 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1587,14 +1587,14 @@ config :pleroma, :config_description, [ children: [ %{ key: :reject, - type: [:string, :regex], + type: [:string], description: "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.", suggestions: ["foo", ~r/foo/iu] }, %{ key: :federated_timeline_removal, - type: [:string, :regex], + type: [:string], description: "A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). Each pattern can be a string or a regular expression.", suggestions: ["foo", ~r/foo/iu] From 0eeeaa37e80f82025658b30455bde45ece0f9c0b Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sun, 12 Jul 2020 01:38:16 +0300 Subject: [PATCH 6/6] Update types in MRF Keyword group --- config/description.exs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/description.exs b/config/description.exs index 6ef329807..90fa9e8e4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1069,6 +1069,7 @@ config :pleroma, :config_description, [ }, %{ key: :webhook_url, + label: "Webhook URL", type: :string, description: "Configure the Slack incoming webhook", suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"] @@ -1587,14 +1588,14 @@ config :pleroma, :config_description, [ children: [ %{ key: :reject, - type: [:string], + type: {:list, :string}, description: "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.", suggestions: ["foo", ~r/foo/iu] }, %{ key: :federated_timeline_removal, - type: [:string], + type: {:list, :string}, description: "A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). Each pattern can be a string or a regular expression.", suggestions: ["foo", ~r/foo/iu]