From 23d279e03ee1f7a1285614754738711359bc4b81 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Thu, 1 Aug 2019 17:28:00 +0300 Subject: [#1149] Replaced RetryQueue with oban-based retries. --- config/config.exs | 17 ++++++++++------- config/test.exs | 4 ++++ 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 17770640a..1bb325bf5 100644 --- a/config/config.exs +++ b/config/config.exs @@ -440,13 +440,7 @@ config :pleroma, Pleroma.User, "web" ] -config :pleroma, Pleroma.Web.Federator.RetryQueue, - enabled: false, - max_jobs: 20, - initial_timeout: 30, - max_retries: 5 - -config :pleroma_job_queue, :queues, +job_queues = [ federator_incoming: 50, federator_outgoing: 50, web_push: 50, @@ -454,6 +448,15 @@ config :pleroma_job_queue, :queues, transmogrifier: 20, scheduled_activities: 10, background: 5 +] + +config :pleroma_job_queue, :queues, job_queues + +config :pleroma, Oban, + repo: Pleroma.Repo, + verbose: false, + prune: {:maxage, 60 * 60 * 24 * 7}, + queues: job_queues config :pleroma, :fetch_initial_posts, enabled: false, diff --git a/config/test.exs b/config/test.exs index 92dca18bc..23d9bf779 100644 --- a/config/test.exs +++ b/config/test.exs @@ -62,6 +62,10 @@ config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock config :pleroma_job_queue, disabled: true +config :pleroma, Oban, + queues: false, + prune: :disabled + config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 2, total_user_limit: 3, -- cgit v1.2.3 From b7fad8d395c2bd1afe445a370e539571f5ec0c18 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Fri, 9 Aug 2019 20:08:01 +0300 Subject: [#1149] Oban jobs implementation for :federator_incoming and :federator_outgoing queues. --- config/config.exs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 1bb325bf5..5fd64365c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -458,6 +458,13 @@ config :pleroma, Oban, prune: {:maxage, 60 * 60 * 24 * 7}, queues: job_queues +config :pleroma, :workers, + retries: [ + compile_time_default: 1, + federator_incoming: 5, + federator_outgoing: 5 + ] + config :pleroma, :fetch_initial_posts, enabled: false, pages: 5 -- cgit v1.2.3 From c29686309eaf2cdae039ce813755c0e23cdc4a03 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Fri, 23 Aug 2019 09:23:10 +0300 Subject: [#1149] Upgraded `oban` from 0.6.0 to 0.7.1. --- config/config.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 9794997d9..1a6348bcd 100644 --- a/config/config.exs +++ b/config/config.exs @@ -469,7 +469,6 @@ config :pleroma, Oban, config :pleroma, :workers, retries: [ - compile_time_default: 1, federator_incoming: 5, federator_outgoing: 5 ] -- cgit v1.2.3 From 581123f8bb703023cb652267a1fc34292f862852 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Fri, 23 Aug 2019 18:28:23 +0300 Subject: [#1149] Introduced `quantum` job scheduler. Documentation & config changes. --- config/config.exs | 40 +++++++++++++++++++++++++++------------- config/test.exs | 2 -- 2 files changed, 27 insertions(+), 15 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 1a6348bcd..43d114d70 100644 --- a/config/config.exs +++ b/config/config.exs @@ -51,6 +51,24 @@ config :pleroma, Pleroma.Repo, telemetry_event: [Pleroma.Repo.Instrumenter], migration_lock: nil +scheduled_jobs = + with digest_config <- Application.get_env(:pleroma, :email_notifications)[:digest], + true <- digest_config[:active] do + [{digest_config[:schedule], {Pleroma.DigestEmailWorker, :perform, []}}] + else + _ -> [] + end + +scheduled_jobs = + scheduled_jobs ++ + [{"0 */6 * * * *", {Pleroma.Web.Websub, :refresh_subscriptions, []}}] + +config :pleroma, Pleroma.Scheduler, + global: true, + overlap: true, + timezone: :utc, + jobs: scheduled_jobs + config :pleroma, Pleroma.Captcha, enabled: false, seconds_valid: 60, @@ -449,23 +467,19 @@ config :pleroma, Pleroma.User, "web" ] -job_queues = [ - federator_incoming: 50, - federator_outgoing: 50, - web_push: 50, - mailer: 10, - transmogrifier: 20, - scheduled_activities: 10, - background: 5 -] - -config :pleroma_job_queue, :queues, job_queues - config :pleroma, Oban, repo: Pleroma.Repo, verbose: false, prune: {:maxage, 60 * 60 * 24 * 7}, - queues: job_queues + queues: [ + federator_incoming: 50, + federator_outgoing: 50, + web_push: 50, + mailer: 10, + transmogrifier: 20, + scheduled_activities: 10, + background: 5 + ] config :pleroma, :workers, retries: [ diff --git a/config/test.exs b/config/test.exs index a0fa67516..62f2a04d2 100644 --- a/config/test.exs +++ b/config/test.exs @@ -61,8 +61,6 @@ config :web_push_encryption, :vapid_details, config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock -config :pleroma_job_queue, disabled: true - config :pleroma, Oban, queues: false, prune: :disabled -- cgit v1.2.3 From a90ea8ba1562818b025f677ffeea35f7ca08ddf2 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sat, 31 Aug 2019 19:08:56 +0300 Subject: [#1149] Addressed code review comments (code style, jobs pruning etc.). --- config/config.exs | 2 +- config/test.exs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index da89aa3e9..6fb4a0969 100644 --- a/config/config.exs +++ b/config/config.exs @@ -470,7 +470,7 @@ config :pleroma, Pleroma.User, config :pleroma, Oban, repo: Pleroma.Repo, verbose: false, - prune: {:maxage, 60 * 60 * 24 * 7}, + prune: {:maxlen, 1500}, queues: [ activity_expiration: 10, federator_incoming: 50, diff --git a/config/test.exs b/config/test.exs index 0ef809ac1..df512b5d7 100644 --- a/config/test.exs +++ b/config/test.exs @@ -65,6 +65,8 @@ config :pleroma, Oban, queues: false, prune: :disabled +config :pleroma, Pleroma.Scheduler, jobs: [] + config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 2, total_user_limit: 3, -- cgit v1.2.3 From b49085c156a6a4449c95c2c315f6250317122735 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Mon, 2 Sep 2019 14:57:40 +0300 Subject: [#1149] Refactoring: GenServer workers renamed to daemons, `use Oban.Worker` moved to helper. --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 6fb4a0969..b742a650d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -54,7 +54,7 @@ config :pleroma, Pleroma.Repo, scheduled_jobs = with digest_config <- Application.get_env(:pleroma, :email_notifications)[:digest], true <- digest_config[:active] do - [{digest_config[:schedule], {Pleroma.DigestEmailWorker, :perform, []}}] + [{digest_config[:schedule], {Pleroma.Daemons.DigestEmailDaemon, :perform, []}}] else _ -> [] end -- cgit v1.2.3 From db690bede92e9ba65b1afaa8605aa5ddb3c992a4 Mon Sep 17 00:00:00 2001 From: Alex S Date: Fri, 2 Aug 2019 21:33:12 +0300 Subject: temp commit --- config/benchmark.exs | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 config/benchmark.exs (limited to 'config') diff --git a/config/benchmark.exs b/config/benchmark.exs new file mode 100644 index 000000000..b4f5dbdbd --- /dev/null +++ b/config/benchmark.exs @@ -0,0 +1,88 @@ +use Mix.Config + +# We don't run a server during test. If one is required, +# you can enable the server option below. +config :pleroma, Pleroma.Web.Endpoint, + http: [port: 4001], + url: [port: 4001], + server: true + +# Disable captha for tests +config :pleroma, Pleroma.Captcha, + # It should not be enabled for automatic tests + enabled: false, + # A fake captcha service for tests + method: Pleroma.Captcha.Mock + +# Print only warnings and errors during test +config :logger, level: :warn + +config :pleroma, :auth, oauth_consumer_strategies: [] + +config :pleroma, Pleroma.Upload, filters: [], link_name: false + +config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads" + +config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true + +config :pleroma, :instance, + email: "admin@example.com", + notify_email: "noreply@example.com", + skip_thread_containment: false, + federating: false + +config :pleroma, :activitypub, sign_object_fetches: false + +# Configure your database +config :pleroma, Pleroma.Repo, + adapter: Ecto.Adapters.Postgres, + username: System.get_env("DB_USER") || "postgres", + database: System.get_env("DB_DATABASE") || "pleroma_test", + hostname: System.get_env("DB_HOST") || "localhost", + # username: "pleroma", + password: + System.get_env("DB_PASS") || + "cAUrGezwXjRwd/lIPzZAcwjb/hiZiGi3FIaSGy9l/XsTcGA61FMy7eCBiRcg1DyQ", + # password: "", + pool_size: 10, + timeout: 180_000 + +# Reduce hash rounds for testing +config :pbkdf2_elixir, rounds: 1 + +config :tesla, adapter: Tesla.Mock + +config :pleroma, :rich_media, + enabled: false, + ignore_hosts: [], + ignore_tld: ["local", "localdomain", "lan"] + +config :web_push_encryption, :vapid_details, + subject: "mailto:administrator@example.com", + public_key: + "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4", + private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA" + +config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock + +config :pleroma_job_queue, disabled: true + +config :pleroma, Pleroma.ScheduledActivity, + daily_user_limit: 2, + total_user_limit: 3, + enabled: false + +config :pleroma, :rate_limit, + search: [{1000, 30}, {1000, 30}], + app_account_creation: {10_000, 5}, + password_reset: {1000, 30} + +config :pleroma, :http_security, report_uri: "https://endpoint.com" + +config :pleroma, :http, send_user_agent: false + +rum_enabled = System.get_env("RUM_ENABLED") == "true" +config :pleroma, :database, rum_enabled: rum_enabled +IO.puts("RUM enabled: #{rum_enabled}") + +config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock -- cgit v1.2.3 From e127b9ab6d01da48ebad188d2b9fcf7cb8a41578 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sat, 14 Sep 2019 16:28:59 +0300 Subject: [#1149] Rewritten readme as config/description.exs. --- config/description.exs | 180 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 117 insertions(+), 63 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index c5ae63915..be5eb0cc3 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1778,87 +1778,141 @@ config :pleroma, :config_description, [ group: :pleroma_job_queue, key: :queues, type: :group, - description: "Pleroma Job Queue configuration: a list of queues with maximum concurrent jobs", + description: "[Deprecated] Replaced with `Oban`/`:queues` (keeping the same format)", + children: [] + }, + %{ + group: :pleroma, + key: Pleroma.Web.Federator.RetryQueue, + type: :group, + description: "[Deprecated] See `Oban` and `:workers` sections for configuration notes", children: [ %{ - key: :federator_outgoing, - type: :integer, - description: "Outgoing federation queue", - suggestions: [50] - }, - %{ - key: :federator_incoming, - type: :integer, - description: "Incoming federation queue", - suggestions: [50] - }, - %{ - key: :mailer, - type: :integer, - description: "Email sender queue, see Pleroma.Emails.Mailer", - suggestions: [10] - }, - %{ - key: :web_push, + key: :max_retries, type: :integer, - description: "Web push notifications queue", - suggestions: [50] - }, + description: "[Deprecated] Replaced as `Oban`/`:queues`/`:outgoing_federation` value", + suggestions: [] + } + ] + }, + %{ + group: :pleroma, + key: Oban, + type: :group, + description: """ + [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration. + + Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1), + it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`, + otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings + (see https://github.com/sorentwo/oban/issues/52). + """, + children: [ %{ - key: :transmogrifier, - type: :integer, - description: "Transmogrifier queue", - suggestions: [20] + key: :repo, + type: :module, + description: "Application's Ecto repo", + suggestions: [Pleroma.Repo] }, %{ - key: :scheduled_activities, - type: :integer, - description: "Scheduled activities queue, see Pleroma.ScheduledActivities", - suggestions: [10] + key: :verbose, + type: :boolean, + description: "Logs verbose mode", + suggestions: [false, true] }, %{ - key: :activity_expiration, - type: :integer, - description: "Activity expiration queue", - suggestions: [10] + key: :prune, + type: [:atom, :tuple], + description: + "Non-retryable jobs [pruning settings](https://github.com/sorentwo/oban#pruning)", + suggestions: [:disabled, {:maxlen, 1500}, {:maxage, 60 * 60}] }, %{ - key: :background, - type: :integer, - description: "Background queue", - suggestions: [5] + key: :queues, + type: :keyword, + description: + "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)", + suggestions: [ + [ + activity_expiration: 10, + background: 5, + federator_incoming: 50, + federator_outgoing: 50, + mailer: 10, + scheduled_activities: 10, + transmogrifier: 20, + web_push: 50 + ] + ], + children: [ + %{ + key: :activity_expiration, + type: :integer, + description: "Activity expiration queue", + suggestions: [10] + }, + %{ + key: :background, + type: :integer, + description: "Background queue", + suggestions: [5] + }, + %{ + key: :federator_incoming, + type: :integer, + description: "Incoming federation queue", + suggestions: [50] + }, + %{ + key: :federator_outgoing, + type: :integer, + description: "Outgoing federation queue", + suggestions: [50] + }, + %{ + key: :mailer, + type: :integer, + description: "Email sender queue, see Pleroma.Emails.Mailer", + suggestions: [10] + }, + %{ + key: :scheduled_activities, + type: :integer, + description: "Scheduled activities queue, see Pleroma.ScheduledActivities", + suggestions: [10] + }, + %{ + key: :transmogrifier, + type: :integer, + description: "Transmogrifier queue", + suggestions: [20] + }, + %{ + key: :web_push, + type: :integer, + description: "Web push notifications queue", + suggestions: [50] + } + ] } ] }, %{ group: :pleroma, - key: Pleroma.Web.Federator.RetryQueue, + key: :workers, type: :group, - description: "", + description: "Includes custom worker options not interpretable directly by `Oban`", children: [ %{ - key: :enabled, - type: :boolean, - description: "If set to true, failed federation jobs will be retried", - suggestions: [true, false] - }, - %{ - key: :max_jobs, - type: :integer, - description: "The maximum amount of parallel federation jobs running at the same time", - suggestions: [20] - }, - %{ - key: :initial_timeout, - type: :integer, - description: "The initial timeout in seconds", - suggestions: [30] - }, - %{ - key: :max_retries, - type: :integer, - description: "The maximum number of times a federation job is retried", - suggestions: [5] + key: :retries, + type: :keyword, + description: "Max retry attempts for failed jobs, per `Oban` queue", + suggestions: [ + [ + federator_incoming: 5, + federator_outgoing: 5 + ] + ] } ] }, -- cgit v1.2.3 From aab264db82054df470075c65ca25c42bbcc5d7a8 Mon Sep 17 00:00:00 2001 From: Steven Fuchs Date: Mon, 16 Sep 2019 07:44:03 +0000 Subject: Streamer refactoring --- config/config.exs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ab6e00c98..b1b98af93 100644 --- a/config/config.exs +++ b/config/config.exs @@ -331,6 +331,10 @@ config :pleroma, :activitypub, follow_handshake_timeout: 500, sign_object_fetches: true +config :pleroma, :streamer, + workers: 3, + overflow_workers: 2 + config :pleroma, :user, deny_follow_blocked: true config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default -- cgit v1.2.3 From c623b4324deaf236334a0f77a81435b5bffadf3c Mon Sep 17 00:00:00 2001 From: kaniini Date: Mon, 16 Sep 2019 09:09:21 +0000 Subject: Revert "Merge branch 'streamer-refactoring' into 'develop'" This reverts merge request !1653 --- config/config.exs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b1b98af93..ab6e00c98 100644 --- a/config/config.exs +++ b/config/config.exs @@ -331,10 +331,6 @@ config :pleroma, :activitypub, follow_handshake_timeout: 500, sign_object_fetches: true -config :pleroma, :streamer, - workers: 3, - overflow_workers: 2 - config :pleroma, :user, deny_follow_blocked: true config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default -- cgit v1.2.3 From 96816ceaa25c21cec7677e75dcddd7ffb42d83c3 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 16 Sep 2019 17:03:37 +0700 Subject: Revert "Merge branch 'revert-4fabf83a' into 'develop'" This reverts commit fe7fd331263007e0fb2877ef7370a09a9704da36, reversing changes made to 4fabf83ad01352442906d79187aeab4c777f4df8. --- config/config.exs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ab6e00c98..b1b98af93 100644 --- a/config/config.exs +++ b/config/config.exs @@ -331,6 +331,10 @@ config :pleroma, :activitypub, follow_handshake_timeout: 500, sign_object_fetches: true +config :pleroma, :streamer, + workers: 3, + overflow_workers: 2 + config :pleroma, :user, deny_follow_blocked: true config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default -- cgit v1.2.3 From d6ab78e610f16e97246ec9e83b3db72f04cf41e7 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 16 Sep 2019 21:48:01 +0700 Subject: Set `account_field_value_length` limit to 2048 by default --- config/config.exs | 2 +- config/description.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b1b98af93..c7e0cf09f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -276,7 +276,7 @@ config :pleroma, :instance, max_account_fields: 10, max_remote_account_fields: 20, account_field_name_length: 512, - account_field_value_length: 512, + account_field_value_length: 2048, external_user_synchronization: true config :pleroma, :markup, diff --git a/config/description.exs b/config/description.exs index be5eb0cc3..32d36d6d6 100644 --- a/config/description.exs +++ b/config/description.exs @@ -878,9 +878,9 @@ config :pleroma, :config_description, [ %{ key: :account_field_value_length, type: :integer, - description: "An account field value maximum length (default: 512)", + description: "An account field value maximum length (default: 2048)", suggestions: [ - 512 + 2048 ] }, %{ -- cgit v1.2.3 From e7afb67c5c26fcb07c1f8d4390c0573cebef9520 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Tue, 17 Sep 2019 16:16:11 +0300 Subject: [#1260] Rate-limiting for create authentication and related requests. --- config/config.exs | 2 +- config/description.exs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c7e0cf09f..15979702f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -585,7 +585,7 @@ config :pleroma, :env, Mix.env() config :http_signatures, adapter: Pleroma.Signature -config :pleroma, :rate_limit, nil +config :pleroma, :rate_limit, authentication: {60_000, 15} config :pleroma, Pleroma.ActivityExpiration, enabled: true diff --git a/config/description.exs b/config/description.exs index 32d36d6d6..bd0378e00 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2424,7 +2424,8 @@ config :pleroma, :config_description, [ group: :pleroma, key: :rate_limit, type: :group, - description: "Rate limit settings. This is an advanced feature and disabled by default.", + description: + "Rate limit settings. This is an advanced feature enabled only for :authentication by default.", children: [ %{ key: :search, @@ -2463,6 +2464,12 @@ config :pleroma, :config_description, [ description: "for fav / unfav or reblog / unreblog actions on the same status by the same user", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] + }, + %{ + key: :authentication, + type: [:tuple, {:list, :tuple}], + description: "for authentication create / password check / user existence check requests", + suggestions: [{60_000, 15}] } ] }, -- cgit v1.2.3 From 35dcea3e13673b8a1a078a1f6fbc44f1e2098c22 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 13 Sep 2019 17:05:19 +0200 Subject: Remove [true,false] for booleans, it is implicit --- config/description.exs | 262 +++++++++++++------------------------------------ 1 file changed, 68 insertions(+), 194 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 32d36d6d6..5ae32d0f2 100644 --- a/config/description.exs +++ b/config/description.exs @@ -39,11 +39,7 @@ config :pleroma, :config_description, [ key: :link_name, type: :boolean, description: - "If enabled, a name parameter will be added to the url of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`", - suggestions: [ - true, - false - ] + "If enabled, a name parameter will be added to the url of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`" }, %{ key: :base_url, @@ -57,11 +53,7 @@ config :pleroma, :config_description, [ key: :proxy_remote, type: :boolean, description: - "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected.", - suggestions: [ - true, - false - ] + "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected." }, %{ key: :proxy_opts, @@ -190,11 +182,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Allow/disallow send emails", - suggestions: [ - true, - false - ] + description: "Allow/disallow send emails" }, %{ group: {:subgroup, Swoosh.Adapters.SMTP}, @@ -221,8 +209,7 @@ config :pleroma, :config_description, [ group: {:subgroup, Swoosh.Adapters.SMTP}, key: :ssl, type: :boolean, - description: "`Swoosh.Adapters.SMTP` adapter specific setting", - suggestions: [true, false] + description: "`Swoosh.Adapters.SMTP` adapter specific setting" }, %{ group: {:subgroup, Swoosh.Adapters.SMTP}, @@ -256,8 +243,7 @@ config :pleroma, :config_description, [ group: {:subgroup, Swoosh.Adapters.SMTP}, key: :no_mx_lookups, type: :boolean, - description: "`Swoosh.Adapters.SMTP` adapter specific setting", - suggestions: [true, false] + description: "`Swoosh.Adapters.SMTP` adapter specific setting" }, %{ group: {:subgroup, Swoosh.Adapters.Sendgrid}, @@ -284,8 +270,7 @@ config :pleroma, :config_description, [ group: {:subgroup, Swoosh.Adapters.Sendmail}, key: :qmail, type: :boolean, - description: "`Swoosh.Adapters.Sendmail` adapter specific setting", - suggestions: [true, false] + description: "`Swoosh.Adapters.Sendmail` adapter specific setting" }, %{ group: {:subgroup, Swoosh.Adapters.Mandrill}, @@ -553,38 +538,22 @@ config :pleroma, :config_description, [ %{ key: :registrations_open, type: :boolean, - description: "Enable registrations for anyone, invitations can be enabled when false", - suggestions: [ - true, - false - ] + description: "Enable registrations for anyone, invitations can be enabled when false" }, %{ key: :invites_enabled, type: :boolean, - description: "Enable user invitations for admins (depends on registrations_open: false)", - suggestions: [ - true, - false - ] + description: "Enable user invitations for admins (depends on registrations_open: false)" }, %{ key: :account_activation_required, type: :boolean, - description: "Require users to confirm their emails before signing in", - suggestions: [ - true, - false - ] + description: "Require users to confirm their emails before signing in" }, %{ key: :federating, type: :boolean, - description: "Enable federation with other instances", - suggestions: [ - true, - false - ] + description: "Enable federation with other instances" }, %{ key: :federation_incoming_replies_max_depth, @@ -618,11 +587,7 @@ config :pleroma, :config_description, [ %{ key: :allow_relay, type: :boolean, - description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance", - suggestions: [ - true, - false - ] + description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance" }, %{ key: :rewrite_policy, @@ -638,11 +603,7 @@ config :pleroma, :config_description, [ type: :boolean, description: "Makes the client API in authentificated mode-only except for user-profiles." <> - " Useful for disabling the Local Timeline and The Whole Known Network", - suggestions: [ - true, - false - ] + " Useful for disabling the Local Timeline and The Whole Known Network" }, %{ key: :quarantined_instances, @@ -658,11 +619,7 @@ config :pleroma, :config_description, [ key: :managed_config, type: :boolean, description: - "Whenether the config for pleroma-fe is configured in this config or in static/config.json", - suggestions: [ - true, - false - ] + "Whenether the config for pleroma-fe is configured in this config or in static/config.json" }, %{ key: :static_dir, @@ -689,11 +646,7 @@ config :pleroma, :config_description, [ key: :mrf_transparency, type: :boolean, description: - "Make the content of your Message Rewrite Facility settings public (via nodeinfo)", - suggestions: [ - true, - false - ] + "Make the content of your Message Rewrite Facility settings public (via nodeinfo)" }, %{ key: :mrf_transparency_exclusions, @@ -709,11 +662,7 @@ config :pleroma, :config_description, [ type: :boolean, description: "Set to true to use extended local nicknames format (allows underscores/dashes)." <> - " This will break federation with older software for theses nicknames", - suggestions: [ - true, - false - ] + " This will break federation with older software for theses nicknames" }, %{ key: :max_pinned_statuses, @@ -741,11 +690,7 @@ config :pleroma, :config_description, [ key: :no_attachment_links, type: :boolean, description: - "Set to true to disable automatically adding attachment link text to statuses", - suggestions: [ - true, - false - ] + "Set to true to disable automatically adding attachment link text to statuses" }, %{ key: :welcome_message, @@ -780,20 +725,12 @@ config :pleroma, :config_description, [ description: "If set to true, only mentions at the beginning of a post will be used to address people in direct messages." <> " This is to prevent accidental mentioning of people when talking about them (e.g. \"@friend hey i really don't like @enemy\")." <> - " Default: false", - suggestions: [ - true, - false - ] + " Default: false" }, %{ key: :healthcheck, type: :boolean, - description: "If set to true, system data will be shown on /api/pleroma/healthcheck", - suggestions: [ - true, - false - ] + description: "If set to true, system data will be shown on /api/pleroma/healthcheck" }, %{ key: :remote_post_retention_days, @@ -823,11 +760,7 @@ config :pleroma, :config_description, [ %{ key: :skip_thread_containment, type: :boolean, - description: "Skip filter out broken threads. The default is true", - suggestions: [ - true, - false - ] + description: "Skip filter out broken threads. The default is true" }, %{ key: :limit_to_local_content, @@ -844,11 +777,7 @@ config :pleroma, :config_description, [ key: :dynamic_configuration, type: :boolean, description: - "Allow transferring configuration to DB with the subsequent customization from Admin api. Defaults to `false`", - suggestions: [ - true, - false - ] + "Allow transferring configuration to DB with the subsequent customization from Admin api. Defaults to `false`" }, %{ key: :max_account_fields, @@ -886,11 +815,7 @@ config :pleroma, :config_description, [ %{ key: :external_user_synchronization, type: :boolean, - description: "Enabling following/followers counters synchronization for external users", - suggestions: [ - true, - false - ] + description: "Enabling following/followers counters synchronization for external users" } ] }, @@ -1069,48 +994,40 @@ config :pleroma, :config_description, [ %{ key: :showInstanceSpecificPanel, type: :boolean, - description: "Whenether to show the instance's specific panel", - suggestions: [true, false] + description: "Whenether to show the instance's specific panel" }, %{ key: :scopeOptionsEnabled, type: :boolean, - description: "Enable setting an notice visibility and subject/CW when posting", - suggestions: [true, false] + description: "Enable setting an notice visibility and subject/CW when posting" }, %{ key: :formattingOptionsEnabled, type: :boolean, description: - "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to :instance, allowed_post_formats", - suggestions: [true, false] + "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to :instance, allowed_post_formats" }, %{ key: :collapseMessageWithSubject, type: :boolean, description: - "When a message has a subject(aka Content Warning), collapse it by default", - suggestions: [true, false] + "When a message has a subject(aka Content Warning), collapse it by default" }, %{ key: :hidePostStats, type: :boolean, - description: "Hide notices statistics(repeats, favorites, ...)", - suggestions: [true, false] + description: "Hide notices statistics(repeats, favorites, ...)" }, %{ key: :hideUserStats, type: :boolean, description: - "Hide profile statistics(posts, posts per day, followers, followings, ...)", - suggestions: [true, false] + "Hide profile statistics(posts, posts per day, followers, followings, ...)" }, %{ key: :scopeCopy, type: :boolean, - description: - "Copy the scope (private/unlisted/public) in replies to posts by default", - suggestions: [true, false] + description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, %{ key: :subjectLineBehavior, @@ -1124,8 +1041,7 @@ config :pleroma, :config_description, [ %{ key: :alwaysShowSubjectInput, type: :boolean, - description: "When set to false, auto-hide the subject field when it's empty", - suggestions: [true, false] + description: "When set to false, auto-hide the subject field when it's empty" } ] }, @@ -1142,8 +1058,7 @@ config :pleroma, :config_description, [ %{ key: :showInstanceSpecificPanel, type: :boolean, - description: "Whenether to show the instance's specific panel", - suggestions: [true, false] + description: "Whenether to show the instance's specific panel" } ] } @@ -1271,14 +1186,12 @@ config :pleroma, :config_description, [ %{ key: :allow_followersonly, type: :boolean, - description: "whether to allow followers-only posts", - suggestions: [true, false] + description: "whether to allow followers-only posts" }, %{ key: :allow_direct, type: :boolean, - description: "whether to allow direct messages", - suggestions: [true, false] + description: "whether to allow direct messages" } ] }, @@ -1393,8 +1306,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables proxying of remote media to the instance's proxy", - suggestions: [true, false] + description: "Enables proxying of remote media to the instance's proxy" }, %{ key: :base_url, @@ -1426,8 +1338,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables the gopher interface", - suggestions: [true, false] + description: "Enables the gopher interface" }, %{ key: :ip, @@ -1601,8 +1512,7 @@ config :pleroma, :config_description, [ %{ key: :secure_cookie_flag, type: :boolean, - description: "", - suggestions: [true, false] + description: "" }, %{ key: :extra_cookie_attrs, @@ -1621,20 +1531,17 @@ config :pleroma, :config_description, [ %{ key: :unfollow_blocked, type: :boolean, - description: "Whether blocks result in people getting unfollowed", - suggestions: [true, false] + description: "Whether blocks result in people getting unfollowed" }, %{ key: :outgoing_blocks, type: :boolean, - description: "Whether to federate blocks to other instances", - suggestions: [true, false] + description: "Whether to federate blocks to other instances" }, %{ key: :sign_object_fetches, type: :boolean, - description: "Sign object fetches with HTTP signatures", - suggestions: [true, false] + description: "Sign object fetches with HTTP signatures" }, %{ key: :follow_handshake_timeout, @@ -1653,14 +1560,12 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Whether the managed content security policy is enabled", - suggestions: [true, false] + description: "Whether the managed content security policy is enabled" }, %{ key: :sts, type: :boolean, - description: "Whether to additionally send a Strict-Transport-Security header", - suggestions: [true, false] + description: "Whether to additionally send a Strict-Transport-Security header" }, %{ key: :sts_max_age, @@ -1727,8 +1632,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Whether the captcha should be shown on registration", - suggestions: [true, false] + description: "Whether the captcha should be shown on registration" }, %{ key: :method, @@ -1817,8 +1721,7 @@ config :pleroma, :config_description, [ %{ key: :verbose, type: :boolean, - description: "Logs verbose mode", - suggestions: [false, true] + description: "Logs verbose mode" }, %{ key: :prune, @@ -1937,11 +1840,7 @@ config :pleroma, :config_description, [ %{ key: :unfurl_nsfw, type: :boolean, - description: "If set to true nsfw attachments will be shown in previews", - suggestions: [ - true, - false - ] + description: "If set to true nsfw attachments will be shown in previews" } ] }, @@ -1955,8 +1854,7 @@ config :pleroma, :config_description, [ key: :enabled, type: :boolean, description: - "if enabled the instance will parse metadata from attached links to generate link previews", - suggestions: [true, false] + "if enabled the instance will parse metadata from attached links to generate link previews" }, %{ key: :ignore_hosts, @@ -1998,8 +1896,7 @@ config :pleroma, :config_description, [ key: :enabled, type: :boolean, description: - "if enabled, when a new user is federated with, fetch some of their latest posts", - suggestions: [true, false] + "if enabled, when a new user is federated with, fetch some of their latest posts" }, %{ key: :pages, @@ -2030,14 +1927,12 @@ config :pleroma, :config_description, [ %{ key: :new_window, type: :boolean, - description: "set to false to remove target='_blank' attribute", - suggestions: [true, false] + description: "set to false to remove target='_blank' attribute" }, %{ key: :scheme, type: :boolean, - description: "Set to true to link urls with schema http://google.com", - suggestions: [true, false] + description: "Set to true to link urls with schema http://google.com" }, %{ key: :truncate, @@ -2049,14 +1944,12 @@ config :pleroma, :config_description, [ %{ key: :strip_prefix, type: :boolean, - description: "Strip the scheme prefix", - suggestions: [true, false] + description: "Strip the scheme prefix" }, %{ key: :extra, type: :boolean, - description: "link urls with rarely used schemes (magnet, ipfs, irc, etc.)", - suggestions: [true, false] + description: "link urls with rarely used schemes (magnet, ipfs, irc, etc.)" } ] }, @@ -2083,8 +1976,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "whether scheduled activities are sent to the job queue to be executed", - suggestions: [true, false] + description: "whether scheduled activities are sent to the job queue to be executed" } ] }, @@ -2097,8 +1989,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "whether expired activities will be sent to the job queue to be deleted", - suggestions: [true, false] + description: "whether expired activities will be sent to the job queue to be deleted" } ] }, @@ -2128,8 +2019,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "enables LDAP authentication", - suggestions: [true, false] + description: "enables LDAP authentication" }, %{ key: :host, @@ -2146,8 +2036,7 @@ config :pleroma, :config_description, [ %{ key: :ssl, type: :boolean, - description: "true to use SSL, usually implies the port 636", - suggestions: [true, false] + description: "true to use SSL, usually implies the port 636" }, %{ key: :sslopts, @@ -2158,8 +2047,7 @@ config :pleroma, :config_description, [ %{ key: :tls, type: :boolean, - description: "true to start TLS, usually implies the port 389", - suggestions: [true, false] + description: "true to start TLS, usually implies the port 389" }, %{ key: :tlsopts, @@ -2237,8 +2125,7 @@ config :pleroma, :config_description, [ %{ key: :active, type: :boolean, - description: "globally enable or disable digest emails", - suggestions: [true, false] + description: "globally enable or disable digest emails" }, %{ key: :schedule, @@ -2346,14 +2233,12 @@ config :pleroma, :config_description, [ key: :issue_new_refresh_token, type: :boolean, description: - "Keeps old refresh token or generate new refresh token when to obtain an access token", - suggestions: [true, false] + "Keeps old refresh token or generate new refresh token when to obtain an access token" }, %{ key: :clean_expired_tokens, type: :boolean, - description: "Enable a background job to clean expired oauth tokens. Defaults to false", - suggestions: [true, false] + description: "Enable a background job to clean expired oauth tokens. Defaults to false" }, %{ key: :clean_expired_tokens_interval, @@ -2415,8 +2300,7 @@ config :pleroma, :config_description, [ %{ key: :rum_enabled, type: :boolean, - description: "If RUM indexes should be used. Defaults to false", - suggestions: [true, false] + description: "If RUM indexes should be used. Defaults to false" } ] }, @@ -2475,8 +2359,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables ssh", - suggestions: [true, false] + description: "Enables ssh" }, %{ key: :priv_dir, @@ -2579,8 +2462,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "", - suggestions: [true, false] + description: "" } ] }, @@ -2593,8 +2475,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables suggestions", - suggestions: [] + description: "Enables suggestions" }, %{ key: :third_party_engine, @@ -2686,8 +2567,7 @@ config :pleroma, :config_description, [ %{ key: :send_user_agent, type: :boolean, - description: "", - suggestions: [true, false] + description: "" }, %{ key: :adapter, @@ -2715,26 +2595,22 @@ config :pleroma, :config_description, [ %{ key: :allow_inline_images, type: :boolean, - description: "", - suggestions: [true, false] + description: "" }, %{ key: :allow_headings, type: :boolean, - description: "", - suggestions: [true, false] + description: "" }, %{ key: :allow_tables, type: :boolean, - description: "", - suggestions: [true, false] + description: "" }, %{ key: :allow_fonts, type: :boolean, - description: "", - suggestions: [true, false] + description: "" }, %{ key: :scrub_policy, @@ -2753,8 +2629,7 @@ config :pleroma, :config_description, [ %{ key: :deny_follow_blocked, type: :boolean, - description: "", - suggestions: [true, false] + description: "" } ] }, @@ -2854,8 +2729,7 @@ config :pleroma, :config_description, [ %{ key: :credentials, type: :boolean, - description: "", - suggestions: [true, false] + description: "" }, %{ key: :headers, -- cgit v1.2.3 From 50ec445b2c1e45b0d3b3a2016650f3262ed00e75 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 17 Sep 2019 21:57:13 +0200 Subject: description.exs: remove empty strings and arrays --- config/description.exs | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 5ae32d0f2..959d839bc 100644 --- a/config/description.exs +++ b/config/description.exs @@ -109,8 +109,7 @@ config :pleroma, :config_description, [ type: :string, description: "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <> - " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint.", - suggestions: [""] + " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint." } ] }, @@ -360,22 +359,19 @@ config :pleroma, :config_description, [ group: {:subgroup, Swoosh.Adapters.SocketLabs}, key: :server_id, type: :string, - description: "`Swoosh.Adapters.SocketLabs` adapter specific setting", - suggestions: [""] + description: "`Swoosh.Adapters.SocketLabs` adapter specific setting" }, %{ group: {:subgroup, Swoosh.Adapters.SocketLabs}, key: :api_key, type: :string, - description: "`Swoosh.Adapters.SocketLabs` adapter specific setting", - suggestions: [""] + description: "`Swoosh.Adapters.SocketLabs` adapter specific setting" }, %{ group: {:subgroup, Swoosh.Adapters.Gmail}, key: :access_token, type: :string, - description: "`Swoosh.Adapters.Gmail` adapter specific setting", - suggestions: [""] + description: "`Swoosh.Adapters.Gmail` adapter specific setting" } ] }, @@ -1682,8 +1678,7 @@ config :pleroma, :config_description, [ group: :pleroma_job_queue, key: :queues, type: :group, - description: "[Deprecated] Replaced with `Oban`/`:queues` (keeping the same format)", - children: [] + description: "[Deprecated] Replaced with `Oban`/`:queues` (keeping the same format)" }, %{ group: :pleroma, @@ -1694,8 +1689,7 @@ config :pleroma, :config_description, [ %{ key: :max_retries, type: :integer, - description: "[Deprecated] Replaced as `Oban`/`:queues`/`:outgoing_federation` value", - suggestions: [] + description: "[Deprecated] Replaced as `Oban`/`:queues`/`:outgoing_federation` value" } ] }, @@ -2041,8 +2035,7 @@ config :pleroma, :config_description, [ %{ key: :sslopts, type: :keyword, - description: "additional SSL options", - suggestions: [] + description: "additional SSL options" }, %{ key: :tls, @@ -2052,8 +2045,7 @@ config :pleroma, :config_description, [ %{ key: :tlsopts, type: :keyword, - description: "additional TLS options", - suggestions: [] + description: "additional TLS options" }, %{ key: :base, -- cgit v1.2.3 From c0c56282007aff88a923bba4769af894cb6235af Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 17 Sep 2019 22:14:56 +0200 Subject: description.exs: remove empty strings on descriptions --- config/description.exs | 76 ++++++-------------------------------------------- 1 file changed, 9 insertions(+), 67 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 959d839bc..821b76972 100644 --- a/config/description.exs +++ b/config/description.exs @@ -857,7 +857,6 @@ config :pleroma, :config_description, [ %{ key: :metadata, type: {:list, :atom}, - description: "", suggestions: [[:request_id]] } ] @@ -883,7 +882,6 @@ config :pleroma, :config_description, [ %{ key: :metadata, type: {:list, :atom}, - description: "", suggestions: [[:request_id]] } ] @@ -1177,7 +1175,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :mrf_rejectnonpublic, type: :group, - description: "", children: [ %{ key: :allow_followersonly, @@ -1444,43 +1441,36 @@ config :pleroma, :config_description, [ %{ key: :instrumenters, type: {:list, :module}, - description: "", suggestions: [Pleroma.Web.Endpoint.Instrumenter] }, %{ key: :protocol, type: :string, - description: "", suggestions: ["https"] }, %{ key: :secret_key_base, type: :string, - description: "", suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"] }, %{ key: :signing_salt, type: :string, - description: "", suggestions: ["CqaoopA2"] }, %{ key: :render_errors, type: :keyword, - description: "", suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]], children: [ %{ key: :view, type: :module, - description: "", suggestions: [Pleroma.Web.ErrorView] }, %{ key: :accepts, type: {:list, :string}, - description: "", suggestions: ["json"] } ] @@ -1488,32 +1478,27 @@ config :pleroma, :config_description, [ %{ key: :pubsub, type: :keyword, - description: "", suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]], children: [ %{ key: :name, type: :module, - description: "", suggestions: [Pleroma.PubSub] }, %{ key: :adapter, type: :module, - description: "", suggestions: [Phoenix.PubSub.PG2] } ] }, %{ key: :secure_cookie_flag, - type: :boolean, - description: "" + type: :boolean }, %{ key: :extra_cookie_attrs, type: {:list, :string}, - description: "", suggestions: ["SameSite=Lax"] } ] @@ -1842,7 +1827,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :rich_media, type: :group, - description: "", children: [ %{ key: :enabled, @@ -1995,7 +1979,6 @@ config :pleroma, :config_description, [ %{ key: Pleroma.Web.Auth.Authenticator, type: :module, - description: "", suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator] } ] @@ -2172,37 +2155,31 @@ config :pleroma, :config_description, [ %{ key: :link_color, type: :string, - description: "", suggestions: ["#d8a070"] }, %{ key: :background_color, type: :string, - description: "", suggestions: ["#2C3645"] }, %{ key: :content_background_color, type: :string, - description: "", suggestions: ["#1B2635"] }, %{ key: :header_color, type: :string, - description: "", suggestions: ["#d8a070"] }, %{ key: :text_color, type: :string, - description: "", suggestions: ["#b9b9ba"] }, %{ key: :text_muted_color, type: :string, - description: "", suggestions: ["#b9b9ba"] } ] @@ -2245,7 +2222,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :emoji, type: :group, - description: "", children: [ %{ key: :shortcode_globs, @@ -2387,7 +2363,6 @@ config :pleroma, :config_description, [ %{ key: :types, type: :map, - description: "", suggestions: [ %{ "application/xml" => ["xml"], @@ -2401,31 +2376,26 @@ config :pleroma, :config_description, [ %{ key: "application/xml", type: {:list, :string}, - description: "", suggestions: [["xml"]] }, %{ key: "application/xrd+xml", type: {:list, :string}, - description: "", suggestions: [["xrd+xml"]] }, %{ key: "application/jrd+json", type: {:list, :string}, - description: "", suggestions: [["jrd+json"]] }, %{ key: "application/activity+json", type: {:list, :string}, - description: "", suggestions: [["activity+json"]] }, %{ key: "application/ld+json", type: {:list, :string}, - description: "", suggestions: [["activity+json"]] } ] @@ -2453,8 +2423,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :enabled, - type: :boolean, - description: "" + type: :boolean } ] }, @@ -2462,7 +2431,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :suggestions, type: :group, - description: "", children: [ %{ key: :enabled, @@ -2492,7 +2460,6 @@ config :pleroma, :config_description, [ %{ key: :web, type: :string, - description: "", suggestions: ["https://vinayaka.distsn.org"] } ] @@ -2519,7 +2486,6 @@ config :pleroma, :config_description, [ %{ key: :adapter, type: :module, - description: "", suggestions: [Pleroma.Signature] } ] @@ -2528,18 +2494,15 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Uploaders.MDII, type: :group, - description: "", children: [ %{ key: :cgi, type: :string, - description: "", suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"] }, %{ key: :files, type: :string, - description: "", suggestions: ["https://mdii.sakura.ne.jp"] } ] @@ -2553,18 +2516,15 @@ config :pleroma, :config_description, [ %{ key: :proxy_url, type: [:string, :atom, nil], - description: "", suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil] }, %{ key: :send_user_agent, - type: :boolean, - description: "" + type: :boolean }, %{ key: :adapter, type: :keyword, - description: "", suggestions: [ [ ssl_options: [ @@ -2582,32 +2542,26 @@ config :pleroma, :config_description, [ group: :pleroma, key: :markup, type: :group, - description: "", children: [ %{ key: :allow_inline_images, - type: :boolean, - description: "" + type: :boolean }, %{ key: :allow_headings, - type: :boolean, - description: "" + type: :boolean }, %{ key: :allow_tables, - type: :boolean, - description: "" + type: :boolean }, %{ key: :allow_fonts, - type: :boolean, - description: "" + type: :boolean }, %{ key: :scrub_policy, type: {:list, :module}, - description: "", suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]] } ] @@ -2616,12 +2570,10 @@ config :pleroma, :config_description, [ group: :pleroma, key: :user, type: :group, - description: "", children: [ %{ key: :deny_follow_blocked, - type: :boolean, - description: "" + type: :boolean } ] }, @@ -2629,12 +2581,10 @@ config :pleroma, :config_description, [ group: :pleroma, key: :mrf_normalize_markup, type: :group, - description: "", children: [ %{ key: :scrub_policy, type: :module, - description: "", suggestions: [Pleroma.HTML.Scrubber.Default] } ] @@ -2643,12 +2593,10 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.User, type: :group, - description: "", children: [ %{ key: :restricted_nicknames, type: {:list, :string}, - description: "", suggestions: [ [ ".well-known", @@ -2689,24 +2637,20 @@ config :pleroma, :config_description, [ %{ group: :cors_plug, type: :group, - description: "", children: [ %{ key: :max_age, type: :integer, - description: "", suggestions: [86_400] }, %{ key: :methods, type: {:list, :string}, - description: "", suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]] }, %{ key: :expose, type: :string, - description: "", suggestions: [ [ "Link", @@ -2720,13 +2664,11 @@ config :pleroma, :config_description, [ }, %{ key: :credentials, - type: :boolean, - description: "" + type: :boolean }, %{ key: :headers, type: {:list, :string}, - description: "", suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]] } ] -- cgit v1.2.3 From 32d64102cb2f8cf3b0f825f2ac0770563cfb457f Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 17 Sep 2019 22:19:30 +0200 Subject: description.exs: uncomment type for email logo --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 821b76972..65ea6bf01 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2133,7 +2133,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :logo, - # type: [:string, nil], + type: [:string, nil], description: "a path to a custom logo. Set it to nil to use the default Pleroma logo", suggestions: ["some/path/logo.png", nil] }, -- cgit v1.2.3 From 7e4c8b56eab0e92b98efbf27e373d68758de540f Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Mon, 12 Aug 2019 10:35:34 +0300 Subject: Add tests for emoji pack sharing --- config/test.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index df512b5d7..da2778aa7 100644 --- a/config/test.exs +++ b/config/test.exs @@ -30,7 +30,8 @@ config :pleroma, :instance, notify_email: "noreply@example.com", skip_thread_containment: false, federating: false, - external_user_synchronization: false + external_user_synchronization: false, + static_dir: "test/instance_static/" config :pleroma, :activitypub, sign_object_fetches: false -- cgit v1.2.3 From ee620ecbf11398277551ef603355a56a53690461 Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Mon, 12 Aug 2019 13:13:01 +0300 Subject: Add caching for emoji pack sharing --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c7e0cf09f..4c758d4a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -122,7 +122,8 @@ config :pleroma, :emoji, # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md` Custom: ["/emoji/*.png", "/emoji/**/*.png"] ], - default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json" + default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json", + shared_pack_cache_seconds_per_file: 60 config :pleroma, :uri_schemes, valid_schemes: [ -- cgit v1.2.3 From 3e972c0456a6f556bd1ee9118116f347d774df61 Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Thu, 19 Sep 2019 00:21:16 +0300 Subject: Add :shared_pack_cache_seconds_per_file to description.exs --- config/description.exs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 65ea6bf01..5dc8dc364 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2256,6 +2256,14 @@ config :pleroma, :config_description, [ "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <> " Currently only one manifest can be added (no arrays)", suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"] + }, + %{ + key: :shared_pack_cache_seconds_per_file, + type: :integer, + descpiption: + "When an emoji pack is shared, the archive is created and cached in memory" <> + " for this amount of seconds multiplied by the number of files.", + suggestions: [60] } ] }, -- cgit v1.2.3 From cf3041220a7a14dc3fac24177fac1f4aecc77f5f Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Tue, 17 Sep 2019 15:22:46 +0700 Subject: Add support for `rel="ugc"` --- config/config.exs | 2 +- config/description.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c7e0cf09f..26dc4d16d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -507,7 +507,7 @@ config :auto_linker, class: false, strip_prefix: false, new_window: false, - rel: false + rel: "ugc" ] config :pleroma, :ldap, diff --git a/config/description.exs b/config/description.exs index 65ea6bf01..abfb6370f 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1900,7 +1900,7 @@ config :pleroma, :config_description, [ key: :rel, type: [:string, false], description: "override the rel attribute. false to clear", - suggestions: ["noopener noreferrer", false] + suggestions: ["ugc", false] }, %{ key: :new_window, -- cgit v1.2.3 From d639cdcecb1b9cd2326b98c926dff8b0f4c27e3c Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 19 Sep 2019 14:04:13 +0700 Subject: Update "config/description.exs" --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index abfb6370f..510e285df 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1900,7 +1900,7 @@ config :pleroma, :config_description, [ key: :rel, type: [:string, false], description: "override the rel attribute. false to clear", - suggestions: ["ugc", false] + suggestions: ["ugc", "noopener noreferrer", false] }, %{ key: :new_window, -- cgit v1.2.3 From 63af6951fa42429d0a02861d5ad1afdd053864cf Mon Sep 17 00:00:00 2001 From: Rachel Fae Fox Date: Mon, 23 Sep 2019 20:38:53 +0000 Subject: add tunable for stream uploads, as needed for jortage to work. --- config/config.exs | 1 + config/description.exs | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 4c758d4a0..1988753d6 100644 --- a/config/config.exs +++ b/config/config.exs @@ -109,6 +109,7 @@ config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" config :pleroma, Pleroma.Uploaders.S3, bucket: nil, + streaming_enabled: true, public_endpoint: "https://s3.amazonaws.com" config :pleroma, Pleroma.Uploaders.MDII, diff --git a/config/description.exs b/config/description.exs index 5dc8dc364..d95250017 100644 --- a/config/description.exs +++ b/config/description.exs @@ -110,6 +110,12 @@ config :pleroma, :config_description, [ description: "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <> " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint." + }, + %{ + key: :streaming_enabled, + type: :boolean, + description: + "Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems." } ] }, -- cgit v1.2.3 From f9380289eb251c818e87e8f0ad0a41fc8bdd90aa Mon Sep 17 00:00:00 2001 From: minibikini Date: Fri, 27 Sep 2019 21:59:23 +0000 Subject: Add `remote_ip` plug --- config/config.exs | 2 ++ config/description.exs | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 403ade60d..36bea19a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -591,6 +591,8 @@ config :pleroma, :rate_limit, nil config :pleroma, Pleroma.ActivityExpiration, enabled: true +config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false + config :pleroma, :web_cache_ttl, activity_pub: nil, activity_pub_question: 30_000 diff --git a/config/description.exs b/config/description.exs index 38b30bbf6..4547ea368 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2687,6 +2687,42 @@ config :pleroma, :config_description, [ } ] }, + %{ + group: :pleroma, + key: Pleroma.Plugs.RemoteIp, + type: :group, + description: """ + **If your instance is not behind at least one reverse proxy, you should not enable this plug.** + + `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration. + """, + children: [ + %{ + key: :enabled, + type: :boolean, + description: "Enable/disable the plug. Defaults to `false`.", + suggestions: [true, false] + }, + %{ + key: :headers, + type: {:list, :string}, + description: + "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Defaults to `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`." + }, + %{ + key: :proxies, + type: {:list, :string}, + description: + "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Defaults to `[]`." + }, + %{ + key: :reserved, + type: {:list, :string}, + description: + "Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network)." + } + ] + }, %{ group: :pleroma, key: :web_cache_ttl, -- cgit v1.2.3 From b8b98ac40f042a8c3d2562edc095f0e1a309760f Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 3 Oct 2019 10:40:49 -0500 Subject: Add missing extended_nickname_format setting to the default config --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 36bea19a0..ddbfb246a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -279,7 +279,8 @@ config :pleroma, :instance, max_remote_account_fields: 20, account_field_name_length: 512, account_field_value_length: 2048, - external_user_synchronization: true + external_user_synchronization: true, + extended_nickname_format: false config :pleroma, :markup, # XXX - unfortunately, inline images must be enabled by default right now, because -- cgit v1.2.3 From 4b3f77a99ff849f7593f63f7dccd206683b34d97 Mon Sep 17 00:00:00 2001 From: Sergey Suprunenko Date: Mon, 7 Oct 2019 12:20:41 +0000 Subject: Extract RSS Feed functionality from OStatus --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index cf94f1a19..f4d92102f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -409,7 +409,8 @@ config :pleroma, Pleroma.Web.Metadata, providers: [ Pleroma.Web.Metadata.Providers.OpenGraph, Pleroma.Web.Metadata.Providers.TwitterCard, - Pleroma.Web.Metadata.Providers.RelMe + Pleroma.Web.Metadata.Providers.RelMe, + Pleroma.Web.Metadata.Providers.Feed ], unfurl_nsfw: false -- cgit v1.2.3 From 02f8e2a8ab65c3e8497bab4576ce4e75f8df3217 Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 10 Oct 2019 14:24:54 +0200 Subject: Gitlab: Run benchmark in CI. --- config/benchmark.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/benchmark.exs b/config/benchmark.exs index b4f5dbdbd..62ba42e28 100644 --- a/config/benchmark.exs +++ b/config/benchmark.exs @@ -29,7 +29,8 @@ config :pleroma, :instance, email: "admin@example.com", notify_email: "noreply@example.com", skip_thread_containment: false, - federating: false + federating: false, + external_user_synchronization: false config :pleroma, :activitypub, sign_object_fetches: false -- cgit v1.2.3 From 2629493804bb5522903434cef7fe70510725f0c1 Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 10 Oct 2019 15:01:06 +0200 Subject: Benchmark config: Database adjustments. --- config/benchmark.exs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'config') diff --git a/config/benchmark.exs b/config/benchmark.exs index 62ba42e28..289a0e317 100644 --- a/config/benchmark.exs +++ b/config/benchmark.exs @@ -37,16 +37,11 @@ config :pleroma, :activitypub, sign_object_fetches: false # Configure your database config :pleroma, Pleroma.Repo, adapter: Ecto.Adapters.Postgres, - username: System.get_env("DB_USER") || "postgres", - database: System.get_env("DB_DATABASE") || "pleroma_test", + username: "postgres", + password: "postgres", + database: "pleroma_test", hostname: System.get_env("DB_HOST") || "localhost", - # username: "pleroma", - password: - System.get_env("DB_PASS") || - "cAUrGezwXjRwd/lIPzZAcwjb/hiZiGi3FIaSGy9l/XsTcGA61FMy7eCBiRcg1DyQ", - # password: "", - pool_size: 10, - timeout: 180_000 + pool: Ecto.Adapters.SQL.Sandbox # Reduce hash rounds for testing config :pbkdf2_elixir, rounds: 1 -- cgit v1.2.3 From ecd7ac855bfc6a8e2f95c099b442d9f0f9117e6b Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 10 Oct 2019 15:42:54 +0200 Subject: Benchmark config: Don't use the sql sandbox. --- config/benchmark.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/benchmark.exs b/config/benchmark.exs index 289a0e317..dd99cf5fd 100644 --- a/config/benchmark.exs +++ b/config/benchmark.exs @@ -41,7 +41,7 @@ config :pleroma, Pleroma.Repo, password: "postgres", database: "pleroma_test", hostname: System.get_env("DB_HOST") || "localhost", - pool: Ecto.Adapters.SQL.Sandbox + pool_size: 10 # Reduce hash rounds for testing config :pbkdf2_elixir, rounds: 1 -- cgit v1.2.3 From fb5dce481c8225579648ec52379a8f5611686196 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 10 Oct 2019 20:05:54 +0000 Subject: Fix https://git.pleroma.social/pleroma/pleroma/issues/1289 --- config/releases.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/releases.exs b/config/releases.exs index 98c5ceccd..36c493673 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -1,6 +1,6 @@ import Config -config :pleroma, :instance, static_dir: "/var/lib/pleroma/static" +config :pleroma, :instance, static: "/var/lib/pleroma/static" config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads" config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs" -- cgit v1.2.3 From c6de0cbb4ae0cf2b04db5e1be79fab6138cbe71a Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 17 Oct 2019 22:31:20 +0000 Subject: config: disable Websub and Salmon publisher modules --- config/config.exs | 8 +------- config/description.exs | 4 +--- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index f4d92102f..d0766a6e2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -59,10 +59,6 @@ scheduled_jobs = _ -> [] end -scheduled_jobs = - scheduled_jobs ++ - [{"0 */6 * * * *", {Pleroma.Web.Websub, :refresh_subscriptions, []}}] - config :pleroma, Pleroma.Scheduler, global: true, overlap: true, @@ -243,9 +239,7 @@ config :pleroma, :instance, federation_incoming_replies_max_depth: 100, federation_reachability_timeout_days: 7, federation_publisher_modules: [ - Pleroma.Web.ActivityPub.Publisher, - Pleroma.Web.Websub, - Pleroma.Web.Salmon + Pleroma.Web.ActivityPub.Publisher ], allow_relay: true, rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy, diff --git a/config/description.exs b/config/description.exs index b007cf69c..571c64bc1 100644 --- a/config/description.exs +++ b/config/description.exs @@ -581,9 +581,7 @@ config :pleroma, :config_description, [ type: [:list, :module], description: "List of modules for federation publishing", suggestions: [ - Pleroma.Web.ActivityPub.Publisher, - Pleroma.Web.Websub, - Pleroma.Web.Salmo + Pleroma.Web.ActivityPub.Publisher ] }, %{ -- cgit v1.2.3 From 638457ba94931c35268cf5fb4d2a432a0def6bdd Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Fri, 11 Oct 2019 14:48:01 +0200 Subject: MastoFE: Add PWA manifest. --- config/config.exs | 10 ++++++++++ config/description.exs | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index d0766a6e2..a69d41d17 100644 --- a/config/config.exs +++ b/config/config.exs @@ -322,6 +322,16 @@ config :pleroma, :assets, ], default_mascot: :pleroma_fox_tan +config :pleroma, :manifest, + icons: [ + %{ + src: "/static/logo.png", + type: "image/png" + } + ], + theme_color: "#282c37", + background_color: "#191b22" + config :pleroma, :activitypub, unfollow_blocked: true, outgoing_blocks: true, diff --git a/config/description.exs b/config/description.exs index 571c64bc1..70e963399 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1098,6 +1098,45 @@ config :pleroma, :config_description, [ } ] }, + %{ + group: :pleroma, + key: :manifest, + type: :group, + description: + "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE", + children: [ + %{ + key: :icons, + type: {:list, :map}, + description: "Describe the icons of the app", + suggestion: [ + %{ + src: "/static/logo.png" + }, + %{ + src: "/static/icon.png", + type: "image/png" + }, + %{ + src: "/static/icon.ico", + sizes: "72x72 96x96 128x128 256x256" + } + ] + }, + %{ + key: :theme_color, + type: :string, + description: "Describe the theme color of the app", + suggestions: ["#282c37", "mediumpurple"] + }, + %{ + key: :background_color, + type: :string, + description: "Describe the background color of the app", + suggestions: ["#191b22", "aliceblue"] + } + ] + }, %{ group: :pleroma, key: :mrf_simple, -- cgit v1.2.3 From 05d111b622c7496260effd298163e9ca2aa59c3d Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 29 Oct 2019 01:15:28 +0300 Subject: Use the default scrubber before mediaproxy transformation --- config/config.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index a69d41d17..e2b00bda1 100644 --- a/config/config.exs +++ b/config/config.exs @@ -284,8 +284,8 @@ config :pleroma, :markup, allow_tables: false, allow_fonts: false, scrub_policy: [ - Pleroma.HTML.Transform.MediaProxy, - Pleroma.HTML.Scrubber.Default + Pleroma.HTML.Scrubber.Default, + Pleroma.HTML.Transform.MediaProxy ] config :pleroma, :frontend_configurations, -- cgit v1.2.3 From 9434e151a9f08067bf324ef027d857b67b0a96cb Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 29 Oct 2019 01:16:22 +0300 Subject: Blacklist myhtmlex nodes from swarm --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e2b00bda1..81d50cdee 100644 --- a/config/config.exs +++ b/config/config.exs @@ -603,6 +603,7 @@ config :pleroma, :web_cache_ttl, activity_pub: nil, activity_pub_question: 30_000 +config :swarm, node_blacklist: [~r/myhtmlex_.*$/] # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" -- cgit v1.2.3 From 2f4e9a068f334167ebf79d30b4366d1e2504b7ef Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 8 Nov 2019 00:14:53 +0300 Subject: Bump fast_sanitize to 0.1.1 The parser C-Node has been completely rewritten to not use the deprecated `erl_interface` api. Closes #1378 since Nodex was ripped out and the replacement randomizes master node name. --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 81d50cdee..787809b27 100644 --- a/config/config.exs +++ b/config/config.exs @@ -603,7 +603,7 @@ config :pleroma, :web_cache_ttl, activity_pub: nil, activity_pub_question: 30_000 -config :swarm, node_blacklist: [~r/myhtmlex_.*$/] +config :swarm, node_blacklist: [~r/myhtml_.*$/] # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" -- cgit v1.2.3 From 886a07ba573a7dc566f51cfb44e69dac49f401cd Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Thu, 7 Nov 2019 19:31:28 -0800 Subject: Move static_fe config to its own section instead of in :instance. --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 787809b27..685c18380 100644 --- a/config/config.exs +++ b/config/config.exs @@ -599,6 +599,8 @@ config :pleroma, Pleroma.ActivityExpiration, enabled: true config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false +config :pleroma, :static_fe, enabled: false + config :pleroma, :web_cache_ttl, activity_pub: nil, activity_pub_question: 30_000 -- cgit v1.2.3 From 9d0b989521dc181eea2e5912445df1c543457a90 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Fri, 8 Nov 2019 09:23:24 +0300 Subject: add subject to atom feed --- config/config.exs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 787809b27..7e1fe2a81 100644 --- a/config/config.exs +++ b/config/config.exs @@ -276,6 +276,12 @@ config :pleroma, :instance, external_user_synchronization: true, extended_nickname_format: false +config :pleroma, :feed, + post_title: %{ + max_length: 100, + omission: "..." + } + config :pleroma, :markup, # XXX - unfortunately, inline images must be enabled by default right now, because # of custom emoji. Issue #275 discusses defanging that somehow. -- cgit v1.2.3 From 4885d403fee868c8d2b2ebedf1bbf37c36f0e333 Mon Sep 17 00:00:00 2001 From: lain Date: Sun, 10 Nov 2019 10:44:23 +0000 Subject: Apply suggestion to config/config.exs --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 7e1fe2a81..a84f6e043 100644 --- a/config/config.exs +++ b/config/config.exs @@ -279,7 +279,7 @@ config :pleroma, :instance, config :pleroma, :feed, post_title: %{ max_length: 100, - omission: "..." + omission: "…" } config :pleroma, :markup, -- cgit v1.2.3 From e08bd99bab2bcdcbcea68c383dd94952f60e0194 Mon Sep 17 00:00:00 2001 From: lain Date: Sun, 10 Nov 2019 11:02:34 +0000 Subject: Apply suggestion to config/config.exs --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index a84f6e043..7e1fe2a81 100644 --- a/config/config.exs +++ b/config/config.exs @@ -279,7 +279,7 @@ config :pleroma, :instance, config :pleroma, :feed, post_title: %{ max_length: 100, - omission: "…" + omission: "..." } config :pleroma, :markup, -- cgit v1.2.3 From 4499a7a0751ec992a78a1023e8e34300f06e14b1 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 10 Nov 2019 15:02:47 +0300 Subject: Disable attachment links by default Closes #1394 --- config/config.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 7e1fe2a81..54de8fa9f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -90,7 +90,7 @@ config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank. config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, filters: [Pleroma.Upload.Filter.Dedupe], - link_name: true, + link_name: false, proxy_remote: false, proxy_opts: [ redirect_on_failure: false, @@ -257,7 +257,7 @@ config :pleroma, :instance, mrf_transparency_exclusions: [], autofollowed_nicknames: [], max_pinned_statuses: 1, - no_attachment_links: false, + no_attachment_links: true, welcome_user_nickname: nil, welcome_message: nil, max_report_comment_size: 1000, -- cgit v1.2.3 From 72cc92259ea2f9d299943b845f7a339255cf99fe Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 11 Nov 2019 12:49:18 +0000 Subject: Default config: Use extended nickname format --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 54de8fa9f..17d15256f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -274,7 +274,7 @@ config :pleroma, :instance, account_field_name_length: 512, account_field_value_length: 2048, external_user_synchronization: true, - extended_nickname_format: false + extended_nickname_format: true config :pleroma, :feed, post_title: %{ -- cgit v1.2.3 From 1d33eeca7224b3b1db97444920b3414b5f65fe69 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 14 Nov 2019 18:26:06 -0600 Subject: config: add configuration for MRF ObjectAgePolicy --- config/config.exs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 75f463797..bf2b3f6e2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -381,6 +381,10 @@ config :pleroma, :mrf_vocabulary, accept: [], reject: [] +config :pleroma, :mrf_object_age, + threshold: 172_800, + actions: [:delist, :strip_followers] + config :pleroma, :rich_media, enabled: true, ignore_hosts: [], -- cgit v1.2.3 From ff9133b978edb637081882e7efd49e2f538e9e15 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 19 Nov 2019 16:01:17 -0600 Subject: Allow mix tasks to always run with debug logging --- config/config.exs | 1 + config/prod.exs | 2 +- config/test.exs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index bf2b3f6e2..9ac78c589 100644 --- a/config/config.exs +++ b/config/config.exs @@ -180,6 +180,7 @@ config :pleroma, Pleroma.Web.Endpoint, # Configures Elixir's Logger config :logger, :console, + level: :debug, format: "$time $metadata[$level] $message\n", metadata: [:request_id] diff --git a/config/prod.exs b/config/prod.exs index 9c205cbd2..301d2b9cb 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -20,7 +20,7 @@ config :pleroma, Pleroma.Web.Endpoint, config :phoenix, serve_endpoints: true # Do not print debug messages in production -config :logger, level: :warn +config :logger, :console, level: :warn # ## SSL Support # diff --git a/config/test.exs b/config/test.exs index da2778aa7..559ff423e 100644 --- a/config/test.exs +++ b/config/test.exs @@ -15,7 +15,7 @@ config :pleroma, Pleroma.Captcha, method: Pleroma.Captcha.Mock # Print only warnings and errors during test -config :logger, level: :warn +config :logger, :console, level: :warn config :pleroma, :auth, oauth_consumer_strategies: [] -- cgit v1.2.3 From cb513a599cc3211e6f5e5d1a1710ec2ae85ec37a Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 19 Nov 2019 16:21:30 -0600 Subject: Allow test builds to have info and debug logs stripped --- config/test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 559ff423e..da2778aa7 100644 --- a/config/test.exs +++ b/config/test.exs @@ -15,7 +15,7 @@ config :pleroma, Pleroma.Captcha, method: Pleroma.Captcha.Mock # Print only warnings and errors during test -config :logger, :console, level: :warn +config :logger, level: :warn config :pleroma, :auth, oauth_consumer_strategies: [] -- cgit v1.2.3 From 1c17f1832983a784156118d1cd488bfde88f092b Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 20 Nov 2019 09:14:27 -0600 Subject: Be specific about format for logs in test as we have tests that check it --- config/test.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index da2778aa7..f8188b9e4 100644 --- a/config/test.exs +++ b/config/test.exs @@ -15,7 +15,9 @@ config :pleroma, Pleroma.Captcha, method: Pleroma.Captcha.Mock # Print only warnings and errors during test -config :logger, level: :warn +config :logger, + level: :warn, + format: "[$level] $message" config :pleroma, :auth, oauth_consumer_strategies: [] -- cgit v1.2.3 From c65190c799b6217dca36f9fe4768024b50b725a8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 20 Nov 2019 11:18:42 -0600 Subject: Console backend's log format should be prefixed and suffixed with newlines. This is how upstream does it by default. --- config/config.exs | 2 +- config/test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 9ac78c589..1e36d3314 100644 --- a/config/config.exs +++ b/config/config.exs @@ -181,7 +181,7 @@ config :pleroma, Pleroma.Web.Endpoint, # Configures Elixir's Logger config :logger, :console, level: :debug, - format: "$time $metadata[$level] $message\n", + format: "\n$time $metadata[$level] $message\n", metadata: [:request_id] config :logger, :ex_syslogger, diff --git a/config/test.exs b/config/test.exs index f8188b9e4..07e70dd4d 100644 --- a/config/test.exs +++ b/config/test.exs @@ -17,7 +17,7 @@ config :pleroma, Pleroma.Captcha, # Print only warnings and errors during test config :logger, level: :warn, - format: "[$level] $message" + format: "\n[$level] $message\n" config :pleroma, :auth, oauth_consumer_strategies: [] -- cgit v1.2.3 From edaae845afc63d558c22019b3b3f87bc510a3bdf Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 20 Nov 2019 11:55:30 -0600 Subject: Some tasks try to set log level in test environment, but we were stripping logs belog :warn. Ensure console backend logs in test environment are :warn, but mix tasks run in test env do not run with :debug because it's far too verbose. --- config/test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 07e70dd4d..9b737d4d7 100644 --- a/config/test.exs +++ b/config/test.exs @@ -15,7 +15,7 @@ config :pleroma, Pleroma.Captcha, method: Pleroma.Captcha.Mock # Print only warnings and errors during test -config :logger, +config :logger, :console, level: :warn, format: "\n[$level] $message\n" -- cgit v1.2.3 From dc9303eac563d23aebce04ad03e55ab072e548ed Mon Sep 17 00:00:00 2001 From: rinpatch Date: Thu, 21 Nov 2019 15:03:27 +0000 Subject: Revert "Merge branch 'patch-1' into 'develop'" This reverts merge request !1829 --- config/releases.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/releases.exs b/config/releases.exs index 36c493673..98c5ceccd 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -1,6 +1,6 @@ import Config -config :pleroma, :instance, static: "/var/lib/pleroma/static" +config :pleroma, :instance, static_dir: "/var/lib/pleroma/static" config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads" config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs" -- cgit v1.2.3 From d3656c2725fa80ea66dd9de2d74893fe9888ef57 Mon Sep 17 00:00:00 2001 From: Sadposter Date: Mon, 25 Nov 2019 09:53:11 +0000 Subject: add ability to set a custom user-agent string --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 1e36d3314..b60ffef7d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -209,6 +209,7 @@ config :tesla, adapter: Tesla.Adapter.Hackney config :pleroma, :http, proxy_url: nil, send_user_agent: true, + user_agent: :default, adapter: [ ssl_options: [ # Workaround for remote server certificate chain issues -- cgit v1.2.3 From 0e9be6bafa81b4a55546b41e8b217fbe559cd16d Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Mon, 25 Nov 2019 14:32:20 +0300 Subject: moved OAuth.Token.CleanWorker to Oban Periodic jobs --- config/config.exs | 6 ++++-- config/description.exs | 7 ------- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 1e36d3314..79d4ee55f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -505,6 +505,9 @@ config :pleroma, Oban, transmogrifier: 20, scheduled_activities: 10, background: 5 + ], + crontab: [ + {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker} ] config :pleroma, :workers, @@ -594,8 +597,7 @@ config :pleroma, :email_notifications, config :pleroma, :oauth2, token_expires_in: 600, issue_new_refresh_token: true, - clean_expired_tokens: false, - clean_expired_tokens_interval: 86_400_000 + clean_expired_tokens: false config :pleroma, :database, rum_enabled: false diff --git a/config/description.exs b/config/description.exs index 70e963399..6b89d7c67 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2251,13 +2251,6 @@ config :pleroma, :config_description, [ key: :clean_expired_tokens, type: :boolean, description: "Enable a background job to clean expired oauth tokens. Defaults to false" - }, - %{ - key: :clean_expired_tokens_interval, - type: :integer, - description: - "Interval to run the job to clean expired tokens. Defaults to 86_400_000 (24 hours).", - suggestions: [86_400_000] } ] }, -- cgit v1.2.3 From ac3abb5414bd7a5bbf53678cdf02b6f59063124c Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Tue, 26 Nov 2019 10:53:07 +0300 Subject: moved Pleroma.Stats to Oban Periodic jobs --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 79d4ee55f..5fc92ca1b 100644 --- a/config/config.exs +++ b/config/config.exs @@ -507,7 +507,8 @@ config :pleroma, Oban, background: 5 ], crontab: [ - {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker} + {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, + {"0 * * * *", Pleroma.Workers.Cron.StatsWorker} ] config :pleroma, :workers, -- cgit v1.2.3 From f673e3deef8b8094a7a5fa012756c468901e5cac Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 26 Nov 2019 05:46:48 -0600 Subject: Default log level for syslog in prod should also be :warn --- config/prod.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/prod.exs b/config/prod.exs index 301d2b9cb..25873f360 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -21,6 +21,7 @@ config :phoenix, serve_endpoints: true # Do not print debug messages in production config :logger, :console, level: :warn +config :logger, :ex_syslogger, level: :warn # ## SSL Support # -- cgit v1.2.3 From 6f202a401babbc73e93fb09e697c4c844688f557 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Wed, 27 Nov 2019 09:26:37 +0300 Subject: moved ScheduledActivity to Oban Periodic jobs --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 5fc92ca1b..f4f7fcce7 100644 --- a/config/config.exs +++ b/config/config.exs @@ -508,7 +508,8 @@ config :pleroma, Oban, ], crontab: [ {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, - {"0 * * * *", Pleroma.Workers.Cron.StatsWorker} + {"0 * * * *", Pleroma.Workers.Cron.StatsWorker}, + {"* * * * *", Pleroma.Workers.Cron.ScheduledActivityWorker} ] config :pleroma, :workers, -- cgit v1.2.3 From c5766a8100de465669178a98f8267425ecfe26e3 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Wed, 27 Nov 2019 13:35:02 +0300 Subject: moved ActivityExpiration to Oban Periodic jobs --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index f4f7fcce7..be8e3ee15 100644 --- a/config/config.exs +++ b/config/config.exs @@ -509,7 +509,8 @@ config :pleroma, Oban, crontab: [ {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, {"0 * * * *", Pleroma.Workers.Cron.StatsWorker}, - {"* * * * *", Pleroma.Workers.Cron.ScheduledActivityWorker} + {"* * * * *", Pleroma.Workers.Cron.ScheduledActivityWorker}, + {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker} ] config :pleroma, :workers, -- cgit v1.2.3 From a4f834a687d82e7883c7dabf55b86a7e2c1dad33 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Wed, 27 Nov 2019 15:59:13 +0300 Subject: moved DigestEmail to Oban Periodic jobs --- config/config.exs | 18 ++---------------- config/test.exs | 2 -- 2 files changed, 2 insertions(+), 18 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index be8e3ee15..ef9b138d1 100644 --- a/config/config.exs +++ b/config/config.exs @@ -51,20 +51,6 @@ config :pleroma, Pleroma.Repo, telemetry_event: [Pleroma.Repo.Instrumenter], migration_lock: nil -scheduled_jobs = - with digest_config <- Application.get_env(:pleroma, :email_notifications)[:digest], - true <- digest_config[:active] do - [{digest_config[:schedule], {Pleroma.Daemons.DigestEmailDaemon, :perform, []}}] - else - _ -> [] - end - -config :pleroma, Pleroma.Scheduler, - global: true, - overlap: true, - timezone: :utc, - jobs: scheduled_jobs - config :pleroma, Pleroma.Captcha, enabled: false, seconds_valid: 60, @@ -510,7 +496,8 @@ config :pleroma, Oban, {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, {"0 * * * *", Pleroma.Workers.Cron.StatsWorker}, {"* * * * *", Pleroma.Workers.Cron.ScheduledActivityWorker}, - {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker} + {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker}, + {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker} ] config :pleroma, :workers, @@ -592,7 +579,6 @@ config :pleroma, Pleroma.ScheduledActivity, config :pleroma, :email_notifications, digest: %{ active: false, - schedule: "0 0 * * 0", interval: 7, inactivity_threshold: 7 } diff --git a/config/test.exs b/config/test.exs index 9b737d4d7..fff709d65 100644 --- a/config/test.exs +++ b/config/test.exs @@ -68,8 +68,6 @@ config :pleroma, Oban, queues: false, prune: :disabled -config :pleroma, Pleroma.Scheduler, jobs: [] - config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 2, total_user_limit: 3, -- cgit v1.2.3 From d55859f5a4cabbe7849dc3f39079b17bd450a303 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Wed, 27 Nov 2019 16:35:12 +0300 Subject: remove `quantum` package --- config/config.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ef9b138d1..54d167a82 100644 --- a/config/config.exs +++ b/config/config.exs @@ -607,7 +607,6 @@ config :pleroma, :web_cache_ttl, activity_pub: nil, activity_pub_question: 30_000 -config :swarm, node_blacklist: [~r/myhtml_.*$/] # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" -- cgit v1.2.3 From 652cc6ba4b7a0494cc96ef4a9bfcaa3b5e5be60e Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Tue, 3 Dec 2019 21:30:10 +0300 Subject: updated ScheduledActivity --- config/config.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e7e17669e..259529f97 100644 --- a/config/config.exs +++ b/config/config.exs @@ -496,7 +496,6 @@ config :pleroma, Oban, crontab: [ {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, {"0 * * * *", Pleroma.Workers.Cron.StatsWorker}, - {"* * * * *", Pleroma.Workers.Cron.ScheduledActivityWorker}, {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker}, {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker} ] -- cgit v1.2.3 From aa97fe8f175c3618a04bb45e6aa7c37e26259577 Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 4 Dec 2019 12:48:34 +0100 Subject: ChatChannel: Ignore messages that are too long. --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b60ffef7d..4624bded2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -225,6 +225,7 @@ config :pleroma, :instance, notify_email: "noreply@example.com", description: "A Pleroma instance, an alternative fediverse server", limit: 5_000, + chat_limit: 5_000, remote_limit: 100_000, upload_limit: 16_000_000, avatar_upload_limit: 2_000_000, -- cgit v1.2.3 From 48ae3c4347f68e20db7e3e67da32be2e70599fb3 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 5 Dec 2019 20:18:25 +0700 Subject: Add support for custom modules --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b60ffef7d..e1358eda0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -249,6 +249,7 @@ config :pleroma, :instance, quarantined_instances: [], managed_config: true, static_dir: "instance/static/", + custom_modules_dir: "instance/modules/", allowed_post_formats: [ "text/plain", "text/html", -- cgit v1.2.3 From af42c00cfffb2cd8e93857cd1cf2901113c45bd2 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Fri, 6 Dec 2019 00:25:44 +0300 Subject: [#1427] Reworked admin scopes support. Requalified users.is_admin flag as legacy accessor to admin actions in case token lacks admin scope(s). --- config/config.exs | 5 ++++- config/description.exs | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index bf2b3f6e2..64397484e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -560,7 +560,10 @@ config :ueberauth, base_path: "/oauth", providers: ueberauth_providers -config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies +config :pleroma, + :auth, + enforce_oauth_admin_scope_usage: false, + oauth_consumer_strategies: oauth_consumer_strategies config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false diff --git a/config/description.exs b/config/description.exs index 70e963399..45e4b43f1 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2094,6 +2094,15 @@ config :pleroma, :config_description, [ type: :group, description: "Authentication / authorization settings", children: [ + %{ + key: :enforce_oauth_admin_scope_usage, + type: :boolean, + description: + "OAuth admin scope requirement toggle. " <> + "If `true`, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <> + "(client app must support admin scopes). If `false` and token doesn't have admin scope(s)," <> + "`is_admin` user flag grants access to admin-specific actions." + }, %{ key: :auth_template, type: :string, -- cgit v1.2.3 From 157bceeda9124cea7ba69eaf6639ca52b3fac7c6 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Fri, 6 Dec 2019 15:04:46 +0700 Subject: Move runtime configuration from `:instance` to `:modules` --- config/config.exs | 3 ++- config/releases.exs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e1358eda0..64e33c82f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -249,7 +249,6 @@ config :pleroma, :instance, quarantined_instances: [], managed_config: true, static_dir: "instance/static/", - custom_modules_dir: "instance/modules/", allowed_post_formats: [ "text/plain", "text/html", @@ -618,6 +617,8 @@ config :pleroma, :web_cache_ttl, activity_pub: nil, activity_pub_question: 30_000 +config :pleroma, :modules, runtime_dir: "instance/modules" + config :swarm, node_blacklist: [~r/myhtml_.*$/] # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/config/releases.exs b/config/releases.exs index 98c5ceccd..b224960db 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -2,6 +2,7 @@ import Config config :pleroma, :instance, static_dir: "/var/lib/pleroma/static" config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads" +config :pleroma, :modules, runtime_dir: "/var/lib/pleroma/modules" config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs" -- cgit v1.2.3 From a75d4a41e03979b4d1b9af5205e457d714ff76df Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Fri, 6 Dec 2019 17:05:09 +0700 Subject: Add a test for custom runtime modules --- config/test.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 9b737d4d7..8b9bf5c77 100644 --- a/config/test.exs +++ b/config/test.exs @@ -93,6 +93,8 @@ config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp3 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock +config :pleroma, :modules, runtime_dir: "test/fixtures/modules" + if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From ed92784e7cfe60756733f518efce14253b1c78d6 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 9 Dec 2019 19:11:54 +0700 Subject: Set Logger level to :info in prod --- config/prod.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/prod.exs b/config/prod.exs index 25873f360..adbce5606 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -20,8 +20,8 @@ config :pleroma, Pleroma.Web.Endpoint, config :phoenix, serve_endpoints: true # Do not print debug messages in production -config :logger, :console, level: :warn -config :logger, :ex_syslogger, level: :warn +config :logger, :console, level: :info +config :logger, :ex_syslogger, level: :info # ## SSL Support # -- cgit v1.2.3 From df469b4468168cf072e73df73e0fdde2bbab1da5 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 11 Dec 2019 12:52:57 -0600 Subject: Benchmark env uses test database so we should be able to use test.secret.exs --- config/benchmark.exs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config') diff --git a/config/benchmark.exs b/config/benchmark.exs index dd99cf5fd..c7ddb80e7 100644 --- a/config/benchmark.exs +++ b/config/benchmark.exs @@ -82,3 +82,11 @@ config :pleroma, :database, rum_enabled: rum_enabled IO.puts("RUM enabled: #{rum_enabled}") config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock + +if File.exists?("./config/test.secret.exs") do + import_config "test.secret.exs" +else + IO.puts( + "You may want to create test.secret.exs to declare custom database connection parameters." + ) +end -- cgit v1.2.3 From 63ffa0e3ed6640ba0c1e1e235b4cafa9ac386fb3 Mon Sep 17 00:00:00 2001 From: stwf Date: Wed, 11 Dec 2019 14:57:33 -0500 Subject: try local sheduling --- config/test.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 9b737d4d7..d52ced612 100644 --- a/config/test.exs +++ b/config/test.exs @@ -68,7 +68,9 @@ config :pleroma, Oban, queues: false, prune: :disabled -config :pleroma, Pleroma.Scheduler, jobs: [] +config :pleroma, Pleroma.Scheduler, + jobs: [], + global: false config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 2, -- cgit v1.2.3 From e53679698424a7d58c308c21d466b07e34e8c3e9 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 11 Dec 2019 22:29:31 +0700 Subject: Add native captcha and enable it by default. --- config/config.exs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 6ed800056..370ddd855 100644 --- a/config/config.exs +++ b/config/config.exs @@ -66,9 +66,9 @@ config :pleroma, Pleroma.Scheduler, jobs: scheduled_jobs config :pleroma, Pleroma.Captcha, - enabled: false, + enabled: true, seconds_valid: 60, - method: Pleroma.Captcha.Kocaptcha + method: Pleroma.Captcha.Native config :pleroma, :hackney_pools, federation: [ @@ -84,8 +84,6 @@ config :pleroma, :hackney_pools, timeout: 300_000 ] -config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" - # Upload configuration config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, -- cgit v1.2.3 From 470a3a678dfb4a7b9c2fe29c6b7ea03cee35ee82 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 12 Dec 2019 18:04:52 +0700 Subject: Add Kocaptcha endpoint to the test config --- config/test.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index d52ced612..b48b89c8f 100644 --- a/config/test.exs +++ b/config/test.exs @@ -95,6 +95,8 @@ config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp3 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock +config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" + if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From 82c62c5028f517ded121b46b9806053989defdc2 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 16 Dec 2019 15:32:33 +0700 Subject: Add default endpoint to Pleroma.Captcha.Kocaptcha --- config/test.exs | 2 -- 1 file changed, 2 deletions(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index b48b89c8f..d52ced612 100644 --- a/config/test.exs +++ b/config/test.exs @@ -95,8 +95,6 @@ config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp3 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock -config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" - if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From 8d242f52d4bf44a012603fb2cc6fe4dd9b282ef8 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 16 Dec 2019 19:33:51 +0700 Subject: Revert "Add default endpoint to Pleroma.Captcha.Kocaptcha" This reverts commit 82c62c5028f517ded121b46b9806053989defdc2. --- config/test.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index d52ced612..b48b89c8f 100644 --- a/config/test.exs +++ b/config/test.exs @@ -95,6 +95,8 @@ config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp3 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock +config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" + if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From fc484e5ce67117389ce9e2cce22ab1944a759242 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 16 Dec 2019 19:35:10 +0700 Subject: Add Kocaptcha endpoint to config.exs --- config/config.exs | 2 ++ config/test.exs | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 370ddd855..47098858b 100644 --- a/config/config.exs +++ b/config/config.exs @@ -70,6 +70,8 @@ config :pleroma, Pleroma.Captcha, seconds_valid: 60, method: Pleroma.Captcha.Native +config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" + config :pleroma, :hackney_pools, federation: [ max_connections: 50, diff --git a/config/test.exs b/config/test.exs index b48b89c8f..d52ced612 100644 --- a/config/test.exs +++ b/config/test.exs @@ -95,8 +95,6 @@ config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp3 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock -config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" - if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From a12b6454bb0a270732f9b55f8d4366c9add44136 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 16 Dec 2019 22:24:03 +0700 Subject: Add an option to require fetches to be signed --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 370ddd855..541fcc2d4 100644 --- a/config/config.exs +++ b/config/config.exs @@ -343,7 +343,8 @@ config :pleroma, :activitypub, unfollow_blocked: true, outgoing_blocks: true, follow_handshake_timeout: 500, - sign_object_fetches: true + sign_object_fetches: true, + authorized_fetch_mode: false config :pleroma, :streamer, workers: 3, -- cgit v1.2.3 From b7811dfb7b612e0f6cf1d9f2451e381d525d965b Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 19 Dec 2019 12:16:53 -0600 Subject: Instead allow a dedicated benchmark config --- config/benchmark.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/benchmark.exs b/config/benchmark.exs index c7ddb80e7..84c6782a2 100644 --- a/config/benchmark.exs +++ b/config/benchmark.exs @@ -83,10 +83,10 @@ IO.puts("RUM enabled: #{rum_enabled}") config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock -if File.exists?("./config/test.secret.exs") do - import_config "test.secret.exs" +if File.exists?("./config/benchmark.secret.exs") do + import_config "benchmark.secret.exs" else IO.puts( - "You may want to create test.secret.exs to declare custom database connection parameters." + "You may want to create benchmark.secret.exs to declare custom database connection parameters." ) end -- cgit v1.2.3 From b012e66e4e70247329c4d043221eb2b988bfb7b3 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 23 Dec 2019 15:14:46 +0700 Subject: Increase CAPTCHA expiration time to 5 minutes --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 5839cbe4a..c8d42e83e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -67,7 +67,7 @@ config :pleroma, Pleroma.Scheduler, config :pleroma, Pleroma.Captcha, enabled: true, - seconds_valid: 60, + seconds_valid: 3000, method: Pleroma.Captcha.Native config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" -- cgit v1.2.3 From 89243fee8e0a20ab05f78ec9b4d40e27109dad99 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 9 Jan 2020 15:45:46 -0600 Subject: Fix captcha time, which was meant to be 5 minutes --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c8d42e83e..103361b29 100644 --- a/config/config.exs +++ b/config/config.exs @@ -67,7 +67,7 @@ config :pleroma, Pleroma.Scheduler, config :pleroma, Pleroma.Captcha, enabled: true, - seconds_valid: 3000, + seconds_valid: 300, method: Pleroma.Captcha.Native config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" -- cgit v1.2.3 From 6c94b7498b889ffe13691123c94bbe5440786852 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Fri, 10 Jan 2020 10:52:21 +0300 Subject: [#1478] OAuth admin tweaks: enforced OAuth admin scopes usage by default, migrated existing OAuth records. Adjusted tests. --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c8d42e83e..eeb88174a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -565,7 +565,7 @@ config :ueberauth, config :pleroma, :auth, - enforce_oauth_admin_scope_usage: false, + enforce_oauth_admin_scope_usage: true, oauth_consumer_strategies: oauth_consumer_strategies config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false -- cgit v1.2.3 From 2753285b7722fdb47f0ebb2180e997cf72f65d1a Mon Sep 17 00:00:00 2001 From: Alex S Date: Sun, 29 Sep 2019 11:17:38 +0300 Subject: config editing through database --- config/description.exs | 527 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 341 insertions(+), 186 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 45e4b43f1..eeb4a6fe9 100644 --- a/config/description.exs +++ b/config/description.exs @@ -23,17 +23,17 @@ config :pleroma, :config_description, [ key: :uploader, type: :module, description: "Module which will be used for uploads", - suggestions: [ - Generator.uploaders_list() - ] + suggestions: [Pleroma.Uploaders.Local, Pleroma.Uploaders.MDII, Pleroma.Uploaders.S3] }, %{ key: :filters, type: {:list, :module}, description: "List of filter modules for uploads", - suggestions: [ - Generator.filters_list() - ] + suggestions: + Generator.list_modules_in_dir( + "lib/pleroma/upload/filter", + "Elixir.Pleroma.Upload.Filter." + ) }, %{ key: :link_name, @@ -58,7 +58,50 @@ config :pleroma, :config_description, [ %{ key: :proxy_opts, type: :keyword, - description: "Proxy options, see `Pleroma.ReverseProxy` documentation" + description: "Options for Pleroma.ReverseProxy", + suggestions: [ + redirect_on_failure: false, + max_body_length: 25 * 1_048_576, + http: [ + follow_redirect: true, + pool: :media + ] + ], + children: [ + %{ + key: :redirect_on_failure, + type: :boolean, + description: + "Redirects the client to the real remote URL if there's any HTTP errors. " <> + "Any error during body processing will not be redirected as the response is chunked" + }, + %{ + key: :max_body_length, + type: :integer, + description: + "limits the content length to be approximately the " <> + "specified length. It is validated with the `content-length` header and also verified when proxying" + }, + %{ + key: :http, + type: :keyword, + description: "HTTP options", + children: [ + %{ + key: :adapter, + type: :keyword, + description: "Adapter specific options" + }, + %{ + key: :proxy_url, + label: "Proxy URL", + type: [:string, :tuple], + description: "Proxy URL", + suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}] + } + ] + } + ] } ] }, @@ -131,9 +174,8 @@ config :pleroma, :config_description, [ description: "List of actions for the mogrify command", suggestions: [ "strip", - ["strip", "auto-orient"], - [{"implode", "1"}], - ["strip", "auto-orient", {"implode", "1"}] + "auto-orient", + {"implode", "1"} ] } ] @@ -151,8 +193,7 @@ config :pleroma, :config_description, [ "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <> " filename extension by using {extension}, for example custom-file-name.{extension}", suggestions: [ - "custom-file-name.{extension}", - nil + "custom-file-name.{extension}" ] } ] @@ -213,12 +254,14 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.SMTP}, key: :ssl, + label: "SSL", type: :boolean, description: "`Swoosh.Adapters.SMTP` adapter specific setting" }, %{ group: {:subgroup, Swoosh.Adapters.SMTP}, key: :tls, + label: "TLS", type: :atom, description: "`Swoosh.Adapters.SMTP` adapter specific setting", suggestions: [:always, :never, :if_available] @@ -247,12 +290,14 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.SMTP}, key: :no_mx_lookups, + label: "No MX lookups", type: :boolean, description: "`Swoosh.Adapters.SMTP` adapter specific setting" }, %{ group: {:subgroup, Swoosh.Adapters.Sendgrid}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.Sendgrid` adapter specific setting", suggestions: ["my-api-key"] @@ -280,6 +325,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.Mandrill}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.Mandrill` adapter specific setting", suggestions: ["my-api-key"] @@ -287,6 +333,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.Mailgun}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.Mailgun` adapter specific setting", suggestions: ["my-api-key"] @@ -301,6 +348,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.Mailjet}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.Mailjet` adapter specific setting", suggestions: ["my-api-key"] @@ -315,6 +363,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.Postmark}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.Postmark` adapter specific setting", suggestions: ["my-api-key"] @@ -322,6 +371,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.SparkPost}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.SparkPost` adapter specific setting", suggestions: ["my-api-key"] @@ -336,7 +386,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.AmazonSES}, key: :region, - type: {:string}, + type: :string, description: "`Swoosh.Adapters.AmazonSES` adapter specific setting", suggestions: ["us-east-1", "us-east-2"] }, @@ -357,6 +407,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.Dyn}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.Dyn` adapter specific setting", suggestions: ["my-api-key"] @@ -370,6 +421,7 @@ config :pleroma, :config_description, [ %{ group: {:subgroup, Swoosh.Adapters.SocketLabs}, key: :api_key, + label: "API key", type: :string, description: "`Swoosh.Adapters.SocketLabs` adapter specific setting" }, @@ -392,22 +444,20 @@ config :pleroma, :config_description, [ type: {:list, :string}, description: "List of the scheme part that is considered valid to be an URL", suggestions: [ - [ - "https", - "http", - "dat", - "dweb", - "gopher", - "ipfs", - "ipns", - "irc", - "ircs", - "magnet", - "mailto", - "mumble", - "ssb", - "xmpp" - ] + "https", + "http", + "dat", + "dweb", + "gopher", + "ipfs", + "ipns", + "irc", + "ircs", + "magnet", + "mailto", + "mumble", + "ssb", + "xmpp" ] } ] @@ -578,7 +628,7 @@ config :pleroma, :config_description, [ }, %{ key: :federation_publisher_modules, - type: [:list, :module], + type: {:list, :module}, description: "List of modules for federation publishing", suggestions: [ Pleroma.Web.ActivityPub.Publisher @@ -591,12 +641,13 @@ config :pleroma, :config_description, [ }, %{ key: :rewrite_policy, - type: {:list, :module}, + type: [:module, {:list, :module}], description: "A list of MRF policies enabled", - suggestions: [ - Pleroma.Web.ActivityPub.MRF.NoOpPolicy, - Generator.mrf_list() - ] + suggestions: + Generator.list_modules_in_dir( + "lib/pleroma/web/activity_pub/mrf", + "Elixir.Pleroma.Web.ActivityPub.MRF." + ) }, %{ key: :public, @@ -644,17 +695,19 @@ config :pleroma, :config_description, [ }, %{ key: :mrf_transparency, + label: "MRF transparency", type: :boolean, description: "Make the content of your Message Rewrite Facility settings public (via nodeinfo)" }, %{ key: :mrf_transparency_exclusions, + label: "MRF transparency exclusions", type: {:list, :string}, description: "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value", suggestions: [ - ["exclusion.com"] + "exclusion.com" ] }, %{ @@ -698,8 +751,7 @@ config :pleroma, :config_description, [ description: "A message that will be send to a newly registered users as a direct message", suggestions: [ - "Hi, @username! Welcome to the board!", - nil + "Hi, @username! Welcome on board!" ] }, %{ @@ -707,8 +759,7 @@ config :pleroma, :config_description, [ type: :string, description: "The nickname of the local user that sends the welcome message", suggestions: [ - "lain", - nil + "lain" ] }, %{ @@ -829,7 +880,7 @@ config :pleroma, :config_description, [ type: [:atom, :tuple, :module], description: "Where logs will be send, :console - send logs to stdout, {ExSyslogger, :ex_syslogger} - to syslog, Quack.Logger - to Slack.", - suggestions: [[:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]] + suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger] } ] }, @@ -861,7 +912,7 @@ config :pleroma, :config_description, [ %{ key: :metadata, type: {:list, :atom}, - suggestions: [[:request_id]] + suggestions: [:request_id] } ] }, @@ -886,7 +937,7 @@ config :pleroma, :config_description, [ %{ key: :metadata, type: {:list, :atom}, - suggestions: [[:request_id]] + suggestions: [:request_id] } ] }, @@ -931,10 +982,14 @@ config :pleroma, :config_description, [ group: :pleroma, key: :frontend_configurations, type: :group, - description: "A keyword list that keeps the configuration data for any kind of frontend", + description: + "This form can be used to configure a keyword list that keeps the configuration data for any " <> + "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <> + "add your own configuration your settings need to be complete as they will override the defaults.", children: [ %{ key: :pleroma_fe, + label: "Pleroma FE", type: :map, description: "Settings for Pleroma FE", suggestions: [ @@ -977,6 +1032,7 @@ config :pleroma, :config_description, [ }, %{ key: :redirectRootNoLogin, + label: "Redirect root no login", type: :string, description: "relative URL which indicates where to redirect when a user isn't logged in", @@ -984,6 +1040,7 @@ config :pleroma, :config_description, [ }, %{ key: :redirectRootLogin, + label: "Redirect root login", type: :string, description: "relative URL which indicates where to redirect when a user is logged in", @@ -991,44 +1048,52 @@ config :pleroma, :config_description, [ }, %{ key: :showInstanceSpecificPanel, + label: "Show instance specific panel", type: :boolean, description: "Whenether to show the instance's specific panel" }, %{ key: :scopeOptionsEnabled, + label: "Scope options enabled", type: :boolean, description: "Enable setting an notice visibility and subject/CW when posting" }, %{ key: :formattingOptionsEnabled, + label: "Formatting options enabled", type: :boolean, description: "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to :instance, allowed_post_formats" }, %{ key: :collapseMessageWithSubject, + label: "Collapse message with subject", type: :boolean, description: "When a message has a subject(aka Content Warning), collapse it by default" }, %{ key: :hidePostStats, + label: "Hide post stats", type: :boolean, description: "Hide notices statistics(repeats, favorites, ...)" }, %{ key: :hideUserStats, + label: "Hide user stats", type: :boolean, description: "Hide profile statistics(posts, posts per day, followers, followings, ...)" }, %{ key: :scopeCopy, + label: "Scope copy", type: :boolean, description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, %{ key: :subjectLineBehavior, + label: "Subject line behavior", type: :string, description: "Allows changing the default behaviour of subject lines in replies. `email`: Copy and preprend re:, as in email, @@ -1038,6 +1103,7 @@ config :pleroma, :config_description, [ }, %{ key: :alwaysShowSubjectInput, + label: "Always show subject input", type: :boolean, description: "When set to false, auto-hide the subject field when it's empty" } @@ -1045,6 +1111,7 @@ config :pleroma, :config_description, [ }, %{ key: :masto_fe, + label: "Masto FE", type: :map, description: "Settings for Masto FE", suggestions: [ @@ -1055,6 +1122,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :showInstanceSpecificPanel, + label: "Show instance specific panel", type: :boolean, description: "Whenether to show the instance's specific panel" } @@ -1071,20 +1139,18 @@ config :pleroma, :config_description, [ children: [ %{ key: :mascots, - type: :keyword, + type: {:keyword, :map}, description: "Keyword of mascots, each element MUST contain both a url and a mime_type key", suggestions: [ - [ - pleroma_fox_tan: %{ - url: "/images/pleroma-fox-tan-smol.png", - mime_type: "image/png" - }, - pleroma_fox_tan_shy: %{ - url: "/images/pleroma-fox-tan-shy.png", - mime_type: "image/png" - } - ] + pleroma_fox_tan: %{ + url: "/images/pleroma-fox-tan-smol.png", + mime_type: "image/png" + }, + pleroma_fox_tan_shy: %{ + url: "/images/pleroma-fox-tan-shy.png", + mime_type: "image/png" + } ] }, %{ @@ -1140,6 +1206,7 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: :mrf_simple, + label: "MRF simple", type: :group, description: "Message Rewrite Facility", children: [ @@ -1151,6 +1218,7 @@ config :pleroma, :config_description, [ }, %{ key: :media_nsfw, + label: "Media NSFW", type: {:list, :string}, description: "List of instances to put medias as NSFW(sensitive) from", suggestions: ["example.com", "*.example.com"] @@ -1197,6 +1265,7 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: :mrf_subchain, + label: "MRF subchain", type: :group, description: "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <> @@ -1217,10 +1286,14 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: :mrf_rejectnonpublic, + description: + "MRF RejectNonPublic settings. RejectNonPublic drops posts with non-public visibility settings.", + label: "MRF reject non public", type: :group, children: [ %{ key: :allow_followersonly, + label: "Allow followers-only", type: :boolean, description: "whether to allow followers-only posts" }, @@ -1234,6 +1307,7 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: :mrf_hellthread, + label: "MRF hellthread", type: :group, description: "Block messages with too much mentions", children: [ @@ -1257,6 +1331,7 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: :mrf_keyword, + label: "MRF keyword", type: :group, description: "Reject or Word-Replace messages with a keyword or regex", children: [ @@ -1276,9 +1351,9 @@ config :pleroma, :config_description, [ }, %{ key: :replace, - type: [{:string, :string}, {:regex, :string}], + type: [{:tuple, :string, :string}, {:tuple, :regex, :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", + "A list of tuples containing {pattern, replacement}, pattern can be a string or a regular expression.", suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}] } ] @@ -1286,6 +1361,7 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: :mrf_mention, + label: "MRF mention", type: :group, description: "Block messages which mention a user", children: [ @@ -1293,13 +1369,14 @@ config :pleroma, :config_description, [ key: :actors, type: {:list, :string}, description: "A list of actors, for which to drop any posts mentioning", - suggestions: [["actor1", "actor2"]] + suggestions: ["actor1", "actor2"] } ] }, %{ group: :pleroma, key: :mrf_vocabulary, + label: "MRF vocabulary", type: :group, description: "Filter messages which belong to certain activity vocabularies", children: [ @@ -1308,14 +1385,14 @@ config :pleroma, :config_description, [ type: {:list, :string}, description: "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted", - suggestions: [["Create", "Follow", "Mention", "Announce", "Like"]] + suggestions: ["Create", "Follow", "Mention", "Announce", "Like"] }, %{ key: :reject, type: {:list, :string}, description: "A list of ActivityStreams terms to reject. If empty, no messages are rejected", - suggestions: [["Create", "Follow", "Mention", "Announce", "Like"]] + suggestions: ["Create", "Follow", "Mention", "Announce", "Like"] } ] }, @@ -1355,7 +1432,49 @@ config :pleroma, :config_description, [ key: :proxy_opts, type: :keyword, description: "Options for Pleroma.ReverseProxy", - suggestions: [[max_body_length: 25 * 1_048_576, redirect_on_failure: false]] + suggestions: [ + redirect_on_failure: false, + max_body_length: 25 * 1_048_576, + http: [ + follow_redirect: true, + pool: :media + ] + ], + children: [ + %{ + key: :redirect_on_failure, + type: :boolean, + description: + "Redirects the client to the real remote URL if there's any HTTP errors. " <> + "Any error during body processing will not be redirected as the response is chunked" + }, + %{ + key: :max_body_length, + type: :integer, + description: + "limits the content length to be approximately the " <> + "specified length. It is validated with the `content-length` header and also verified when proxying" + }, + %{ + key: :http, + type: :keyword, + description: "HTTP options", + children: [ + %{ + key: :adapter, + type: :keyword, + description: "Adapter specific options" + }, + %{ + key: :proxy_url, + label: "Proxy URL", + type: [:string, :tuple], + description: "Proxy URL", + suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}] + } + ] + } + ] }, %{ key: :whitelist, @@ -1404,10 +1523,12 @@ config :pleroma, :config_description, [ children: [ %{ key: :http, - type: :keyword, + label: "HTTP", + type: {:keyword, :integer, :tuple}, description: "http protocol configuration", suggestions: [ - [port: 8080, ip: {127, 0, 0, 1}] + port: 8080, + ip: {127, 0, 0, 1} ], children: [ %{ @@ -1415,21 +1536,20 @@ config :pleroma, :config_description, [ type: {:list, :tuple}, description: "dispatch settings", suggestions: [ - [ - {:_, - [ - {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, - {"/websocket", Phoenix.Endpoint.CowboyWebSocket, - {Phoenix.Transports.WebSocket, - {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}}, - {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} - ]} - # end copied from config.exs - ] + {:_, + [ + {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, + {"/websocket", Phoenix.Endpoint.CowboyWebSocket, + {Phoenix.Transports.WebSocket, + {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}}, + {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} + ]} + # end copied from config.exs ] }, %{ key: :ip, + label: "IP", type: :tuple, description: "ip", suggestions: [ @@ -1448,10 +1568,13 @@ config :pleroma, :config_description, [ }, %{ key: :url, - type: :keyword, + label: "URL", + type: {:keyword, :string, :integer}, description: "configuration for generating urls", suggestions: [ - [host: "example.com", port: 2020, scheme: "https"] + host: "example.com", + port: 2020, + scheme: "https" ], children: [ %{ @@ -1504,7 +1627,7 @@ config :pleroma, :config_description, [ %{ key: :render_errors, type: :keyword, - suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]], + suggestions: [view: Pleroma.Web.ErrorView, accepts: ~w(json)], children: [ %{ key: :view, @@ -1521,7 +1644,7 @@ config :pleroma, :config_description, [ %{ key: :pubsub, type: :keyword, - suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]], + suggestions: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2], children: [ %{ key: :name, @@ -1588,17 +1711,20 @@ config :pleroma, :config_description, [ }, %{ key: :sts, + label: "STS", type: :boolean, description: "Whether to additionally send a Strict-Transport-Security header" }, %{ key: :sts_max_age, + label: "STS max age", type: :integer, description: "The maximum age for the Strict-Transport-Security header if sent", suggestions: [31_536_000] }, %{ key: :ct_max_age, + label: "CT max age", type: :integer, description: "The maximum age for the Expect-CT header if sent", suggestions: [2_592_000] @@ -1611,6 +1737,7 @@ config :pleroma, :config_description, [ }, %{ key: :report_uri, + label: "Report URI", type: :string, description: "Adds the specified url to report-uri and report-to group in CSP header", suggestions: ["https://example.com/report-uri"] @@ -1754,20 +1881,18 @@ config :pleroma, :config_description, [ }, %{ key: :queues, - type: :keyword, + type: {:keyword, :integer}, description: "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)", suggestions: [ - [ - activity_expiration: 10, - background: 5, - federator_incoming: 50, - federator_outgoing: 50, - mailer: 10, - scheduled_activities: 10, - transmogrifier: 20, - web_push: 50 - ] + activity_expiration: 10, + background: 5, + federator_incoming: 50, + federator_outgoing: 50, + mailer: 10, + scheduled_activities: 10, + transmogrifier: 20, + web_push: 50 ], children: [ %{ @@ -1830,7 +1955,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :retries, - type: :keyword, + type: {:keyword, :integer}, description: "Max retry attempts for failed jobs, per `Oban` queue", suggestions: [ [ @@ -1845,22 +1970,21 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.Web.Metadata, type: :group, - decsription: "Metadata-related settings", + description: "Metadata-related settings", children: [ %{ key: :providers, type: {:list, :module}, description: "List of metadata providers to enable", suggestions: [ - [ - Pleroma.Web.Metadata.Providers.OpenGraph, - Pleroma.Web.Metadata.Providers.TwitterCard, - Pleroma.Web.Metadata.Providers.RelMe - ] + Pleroma.Web.Metadata.Providers.OpenGraph, + Pleroma.Web.Metadata.Providers.TwitterCard, + Pleroma.Web.Metadata.Providers.RelMe ] }, %{ key: :unfurl_nsfw, + label: "Unfurl NSFW", type: :boolean, description: "If set to true nsfw attachments will be shown in previews" } @@ -1870,39 +1994,45 @@ config :pleroma, :config_description, [ group: :pleroma, key: :rich_media, type: :group, + description: + "If enabled the instance will parse metadata from attached links to generate link previews.", children: [ %{ key: :enabled, type: :boolean, - description: - "if enabled the instance will parse metadata from attached links to generate link previews" + description: "Enables/disables RichMedia." }, %{ key: :ignore_hosts, type: {:list, :string}, - description: "list of hosts which will be ignored by the metadata parser", - suggestions: [["accounts.google.com", "xss.website"]] + description: "List of hosts which will be ignored by the metadata parser.", + suggestions: ["accounts.google.com", "xss.website"] }, %{ key: :ignore_tld, + label: "Ignore TLD", type: {:list, :string}, - description: "list TLDs (top-level domains) which will ignore for parse metadata", - suggestions: [["local", "localdomain", "lan"]] + description: "List TLDs (top-level domains) which will ignore for parse metadata.", + suggestions: ["local", "localdomain", "lan"] }, %{ key: :parsers, type: {:list, :module}, - description: "list of Rich Media parsers", + description: "List of Rich Media parsers.", suggestions: [ - Generator.richmedia_parsers() + Pleroma.Web.RichMedia.Parsers.MetaTagsParser, + Pleroma.Web.RichMedia.Parsers.OEmbed, + Pleroma.Web.RichMedia.Parsers.OGP, + Pleroma.Web.RichMedia.Parsers.TwitterCard ] }, %{ key: :ttl_setters, + label: "TTL setters", type: {:list, :module}, - description: "list of rich media ttl setters", + description: "List of rich media ttl setters.", suggestions: [ - [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl] + Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl ] } ] @@ -2055,23 +2185,57 @@ config :pleroma, :config_description, [ }, %{ key: :ssl, + label: "SSL", type: :boolean, description: "true to use SSL, usually implies the port 636" }, %{ key: :sslopts, + label: "SSL options", type: :keyword, - description: "additional SSL options" + description: "additional SSL options", + suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer], + children: [ + %{ + key: :cacertfile, + type: :string, + description: "Path to file with PEM encoded cacerts", + suggestions: ["path/to/file/with/PEM/cacerts"] + }, + %{ + key: :verify, + type: :atom, + description: "Type of cert verification", + suggestions: [:verify_peer] + } + ] }, %{ key: :tls, + label: "TLS", type: :boolean, description: "true to start TLS, usually implies the port 389" }, %{ key: :tlsopts, + label: "TLS options", type: :keyword, - description: "additional TLS options" + description: "additional TLS options", + suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer], + children: [ + %{ + key: :cacertfile, + type: :string, + description: "Path to file with PEM encoded cacerts", + suggestions: ["path/to/file/with/PEM/cacerts"] + }, + %{ + key: :verify, + type: :atom, + description: "Type of cert verification", + suggestions: [:verify_peer] + } + ] }, %{ key: :base, @@ -2120,7 +2284,7 @@ config :pleroma, :config_description, [ }, %{ key: :oauth_consumer_strategies, - type: :string, + type: {:list, :string}, description: "the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <> " Each entry in this space-delimited string should be of format or :" <> @@ -2163,7 +2327,7 @@ config :pleroma, :config_description, [ }, %{ key: :interval, - type: :ininteger, + type: :integer, description: "Minimum interval between digest emails to one user", suggestions: [7] }, @@ -2185,9 +2349,9 @@ config :pleroma, :config_description, [ children: [ %{ key: :logo, - type: [:string, nil], + type: :string, description: "a path to a custom logo. Set it to nil to use the default Pleroma logo", - suggestions: ["some/path/logo.png", nil] + suggestions: ["some/path/logo.png"] }, %{ key: :styling, @@ -2279,26 +2443,24 @@ config :pleroma, :config_description, [ key: :shortcode_globs, type: {:list, :string}, description: "Location of custom emoji files. * can be used as a wildcard", - suggestions: [["/emoji/custom/**/*.png"]] + suggestions: ["/emoji/custom/**/*.png"] }, %{ key: :pack_extensions, type: {:list, :string}, description: "A list of file extensions for emojis, when no emoji.txt for a pack is present", - suggestions: [[".png", ".gif"]] + suggestions: [".png", ".gif"] }, %{ key: :groups, - type: :keyword, + type: {:keyword, :string, {:list, :string}}, description: "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname" <> " and the value the location or array of locations. * can be used as a wildcard", suggestions: [ - [ - # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md` - Custom: ["/emoji/*.png", "/emoji/**/*.png"] - ] + # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md` + Custom: ["/emoji/*.png", "/emoji/**/*.png"] ] }, %{ @@ -2389,7 +2551,8 @@ config :pleroma, :config_description, [ group: :esshd, type: :group, description: - "To enable simple command line interface accessible over ssh, add a setting like this to your configuration file", + "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <> + "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key", children: [ %{ key: :enabled, @@ -2443,27 +2606,27 @@ config :pleroma, :config_description, [ %{ key: "application/xml", type: {:list, :string}, - suggestions: [["xml"]] + suggestions: ["xml"] }, %{ key: "application/xrd+xml", type: {:list, :string}, - suggestions: [["xrd+xml"]] + suggestions: ["xrd+xml"] }, %{ key: "application/jrd+json", type: {:list, :string}, - suggestions: [["jrd+json"]] + suggestions: ["jrd+json"] }, %{ key: "application/activity+json", type: {:list, :string}, - suggestions: [["activity+json"]] + suggestions: ["activity+json"] }, %{ key: "application/ld+json", type: {:list, :string}, - suggestions: [["activity+json"]] + suggestions: ["activity+json"] } ] } @@ -2560,6 +2723,8 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: Pleroma.Uploaders.MDII, + description: + "Uploader for https://github.com/hakaba-hitoyo/minimal-digital-image-infrastructure", type: :group, children: [ %{ @@ -2582,8 +2747,10 @@ config :pleroma, :config_description, [ children: [ %{ key: :proxy_url, - type: [:string, :atom, nil], - suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil] + label: "Proxy URL", + type: [:string, :tuple], + description: "Proxy URL", + suggestions: ["localhost:9020", {:socks5, :localhost, 3090}] }, %{ key: :send_user_agent, @@ -2592,16 +2759,8 @@ config :pleroma, :config_description, [ %{ key: :adapter, type: :keyword, - suggestions: [ - [ - ssl_options: [ - # Workaround for remote server certificate chain issues - partial_chain: &:hackney_connect.partial_chain/1, - # We don't support TLS v1.3 yet - versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"] - ] - ] - ] + description: "Adapter specific options", + suggestions: [] } ] }, @@ -2629,7 +2788,7 @@ config :pleroma, :config_description, [ %{ key: :scrub_policy, type: {:list, :module}, - suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]] + suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default] } ] }, @@ -2647,6 +2806,8 @@ config :pleroma, :config_description, [ %{ group: :pleroma, key: :mrf_normalize_markup, + label: "MRF normalize markup", + description: "MRF NormalizeMarkup settings. Scrub configured hypertext markup.", type: :group, children: [ %{ @@ -2665,38 +2826,36 @@ config :pleroma, :config_description, [ key: :restricted_nicknames, type: {:list, :string}, suggestions: [ - [ - ".well-known", - "~", - "about", - "activities", - "api", - "auth", - "check_password", - "dev", - "friend-requests", - "inbox", - "internal", - "main", - "media", - "nodeinfo", - "notice", - "oauth", - "objects", - "ostatus_subscribe", - "pleroma", - "proxy", - "push", - "registration", - "relay", - "settings", - "status", - "tag", - "user-search", - "user_exists", - "users", - "web" - ] + ".well-known", + "~", + "about", + "activities", + "api", + "auth", + "check_password", + "dev", + "friend-requests", + "inbox", + "internal", + "main", + "media", + "nodeinfo", + "notice", + "oauth", + "objects", + "ostatus_subscribe", + "pleroma", + "proxy", + "push", + "registration", + "relay", + "settings", + "status", + "tag", + "user-search", + "user_exists", + "users", + "web" ] } ] @@ -2713,20 +2872,18 @@ config :pleroma, :config_description, [ %{ key: :methods, type: {:list, :string}, - suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]] + suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"] }, %{ key: :expose, - type: :string, + type: {:list, :string}, suggestions: [ - [ - "Link", - "X-RateLimit-Reset", - "X-RateLimit-Limit", - "X-RateLimit-Remaining", - "X-Request-Id", - "Idempotency-Key" - ] + "Link", + "X-RateLimit-Reset", + "X-RateLimit-Limit", + "X-RateLimit-Remaining", + "X-Request-Id", + "Idempotency-Key" ] }, %{ @@ -2736,7 +2893,7 @@ config :pleroma, :config_description, [ %{ key: :headers, type: {:list, :string}, - suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]] + suggestions: ["Authorization", "Content-Type", "Idempotency-Key"] } ] }, @@ -2745,16 +2902,14 @@ config :pleroma, :config_description, [ key: Pleroma.Plugs.RemoteIp, type: :group, description: """ - **If your instance is not behind at least one reverse proxy, you should not enable this plug.** - `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration. + **If your instance is not behind at least one reverse proxy, you should not enable this plug.** """, children: [ %{ key: :enabled, type: :boolean, - description: "Enable/disable the plug. Defaults to `false`.", - suggestions: [true, false] + description: "Enable/disable the plug. Defaults to `false`." }, %{ key: :headers, @@ -2788,7 +2943,7 @@ config :pleroma, :config_description, [ type: :integer, description: "activity pub routes (except question activities). Defaults to `nil` (no expiration).", - suggestions: [30_000, nil] + suggestions: [30_000] }, %{ key: :activity_pub_question, -- cgit v1.2.3 From 4306769671e4859bc9b4c8ca52c186819aae3aea Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 10 Dec 2019 12:16:19 +0300 Subject: adapter children --- config/description.exs | 54 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index eeb4a6fe9..9e8c114b5 100644 --- a/config/description.exs +++ b/config/description.exs @@ -90,7 +90,23 @@ config :pleroma, :config_description, [ %{ key: :adapter, type: :keyword, - description: "Adapter specific options" + description: "Adapter specific options", + children: [ + %{ + key: :ssl_options, + type: :keyword, + label: "SSL Options", + description: "SSL options for HTTP adapter", + children: [ + %{ + key: :versions, + type: {:list, :atom}, + descriptions: "List of TLS version to use", + suggestions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"] + } + ] + } + ] }, %{ key: :proxy_url, @@ -1463,7 +1479,23 @@ config :pleroma, :config_description, [ %{ key: :adapter, type: :keyword, - description: "Adapter specific options" + description: "Adapter specific options", + children: [ + %{ + key: :ssl_options, + type: :keyword, + label: "SSL Options", + description: "SSL options for HTTP adapter", + children: [ + %{ + key: :versions, + type: {:list, :atom}, + descriptions: "List of TLS version to use", + suggestions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"] + } + ] + } + ] }, %{ key: :proxy_url, @@ -2760,7 +2792,23 @@ config :pleroma, :config_description, [ key: :adapter, type: :keyword, description: "Adapter specific options", - suggestions: [] + suggestions: [], + children: [ + %{ + key: :ssl_options, + type: :keyword, + label: "SSL Options", + description: "SSL options for HTTP adapter", + children: [ + %{ + key: :versions, + type: {:list, :atom}, + descriptions: "List of TLS version to use", + suggestions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"] + } + ] + } + ] } ] }, -- cgit v1.2.3 From f9d01068cf0d47040abc3d51f8ea8a3a264c027f Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 16 Dec 2019 18:13:22 +0300 Subject: suggestions fix --- config/description.exs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 9e8c114b5..3abcc6266 100644 --- a/config/description.exs +++ b/config/description.exs @@ -701,12 +701,10 @@ config :pleroma, :config_description, [ type: {:list, :string}, description: "MIME-type list of formats allowed to be posted (transformed into HTML)", suggestions: [ - [ - "text/plain", - "text/html", - "text/markdown", - "text/bbcode" - ] + "text/plain", + "text/html", + "text/markdown", + "text/bbcode" ] }, %{ @@ -1990,10 +1988,8 @@ config :pleroma, :config_description, [ type: {:keyword, :integer}, description: "Max retry attempts for failed jobs, per `Oban` queue", suggestions: [ - [ - federator_incoming: 5, - federator_outgoing: 5 - ] + federator_incoming: 5, + federator_outgoing: 5 ] } ] -- cgit v1.2.3 From cda2c1fc630e455b3d419f5c3b22c366dc883ce1 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Dec 2019 10:22:53 +0300 Subject: fix for subgroup tuple added settings for swoosh adapters local --- config/description.exs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 3abcc6266..52f7d2017 100644 --- a/config/description.exs +++ b/config/description.exs @@ -238,7 +238,8 @@ config :pleroma, :config_description, [ Swoosh.Adapters.AmazonSES, Swoosh.Adapters.Dyn, Swoosh.Adapters.SocketLabs, - Swoosh.Adapters.Gmail + Swoosh.Adapters.Gmail, + Swoosh.Adapters.Local ] }, %{ @@ -449,6 +450,26 @@ config :pleroma, :config_description, [ } ] }, + %{ + group: :swoosh, + type: :group, + description: "`Swoosh.Adapters.Local` adapter specific settings", + children: [ + %{ + group: {:subgroup, Swoosh.Adapters.Local}, + key: :serve_mailbox, + type: :boolean, + description: "Run the preview server together as part of your app" + }, + %{ + group: {:subgroup, Swoosh.Adapters.Local}, + key: :preview_port, + type: :integer, + description: "The preview server port", + suggestions: [4001] + } + ] + }, %{ group: :pleroma, key: :uri_schemes, -- cgit v1.2.3 From 0b020403276519da84dce51053240ac6637eb1b3 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 25 Dec 2019 15:31:51 +0300 Subject: little fixes and typos fix --- config/description.exs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 52f7d2017..a9b2efec5 100644 --- a/config/description.exs +++ b/config/description.exs @@ -101,8 +101,8 @@ config :pleroma, :config_description, [ %{ key: :versions, type: {:list, :atom}, - descriptions: "List of TLS version to use", - suggestions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"] + description: "List of TLS version to use", + suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"] } ] } @@ -1509,8 +1509,8 @@ config :pleroma, :config_description, [ %{ key: :versions, type: {:list, :atom}, - descriptions: "List of TLS version to use", - suggestions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"] + description: "List of TLS version to use", + suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"] } ] } @@ -2820,8 +2820,8 @@ config :pleroma, :config_description, [ %{ key: :versions, type: {:list, :atom}, - descriptions: "List of TLS version to use", - suggestions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"] + description: "List of TLS version to use", + suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"] } ] } -- cgit v1.2.3 From 00aff5f78c5df202ffd0dcad231f819c3d11fe18 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 10 Jan 2020 17:54:54 +0300 Subject: syncing new setting to descriptions.exs --- config/description.exs | 97 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index a9b2efec5..285c8b19c 100644 --- a/config/description.exs +++ b/config/description.exs @@ -545,6 +545,14 @@ config :pleroma, :config_description, [ 5_000 ] }, + %{ + key: :chat_limit, + type: :integer, + description: "Character limit of the instance chat messages", + suggestions: [ + 5_000 + ] + }, %{ key: :remote_limit, type: :integer, @@ -1840,7 +1848,7 @@ config :pleroma, :config_description, [ key: :method, type: :module, description: "The method/service to use for captcha", - suggestions: [Pleroma.Captcha.Kocaptcha] + suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native] }, %{ key: :seconds_valid, @@ -2028,7 +2036,8 @@ config :pleroma, :config_description, [ suggestions: [ Pleroma.Web.Metadata.Providers.OpenGraph, Pleroma.Web.Metadata.Providers.TwitterCard, - Pleroma.Web.Metadata.Providers.RelMe + Pleroma.Web.Metadata.Providers.RelMe, + Pleroma.Web.Metadata.Providers.Feed ] }, %{ @@ -2805,6 +2814,13 @@ config :pleroma, :config_description, [ key: :send_user_agent, type: :boolean }, + %{ + key: :user_agent, + type: [:string, :atom], + desctiption: + "what user agent should we use? (default: `:default`), must be string or `:default`", + suggestions: ["Pleroma", :default] + }, %{ key: :adapter, type: :keyword, @@ -3018,5 +3034,82 @@ config :pleroma, :config_description, [ suggestions: [30_000] } ] + }, + %{ + group: :pleroma, + key: :static_fe, + type: :group, + description: + "Render profiles and posts using server-generated HTML that is viewable without using JavaScript.", + children: [ + %{ + key: :enabled, + type: :boolean, + description: "Enables the rendering of static HTML. Defaults to `false`." + } + ] + }, + %{ + group: :pleroma, + key: :feed, + type: :group, + description: "Configure feed rendering.", + children: [ + %{ + key: :post_title, + type: :map, + description: "Configure title rendering.", + children: [ + %{ + key: :max_length, + type: :integer, + description: "Maximum number of characters before truncating title.", + suggestions: [100] + }, + %{ + key: :omission, + type: :string, + description: "Replacement which will be used after truncating string.", + suggestions: ["..."] + } + ] + } + ] + }, + %{ + group: :pleroma, + key: :mrf_object_age, + type: :group, + description: "Rejects or delists posts based on their age when received.", + children: [ + %{ + key: :threshold, + type: :integer, + description: "Required age (in seconds) of a post before actions are taken.", + suggestions: [172_800] + }, + %{ + key: :actions, + type: {:list, :atom}, + 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; " <> + "`:reject` rejects the message entirely", + suggestions: [:delist, :strip_followers, :reject] + } + ] + }, + %{ + group: :pleroma, + key: :modules, + type: :group, + description: "Custom Runtime Modules.", + children: [ + %{ + key: :runtime_dir, + type: :string, + description: "A path to custom Elixir modules (such as MRF policies)." + } + ] } ] -- cgit v1.2.3 From 7d128ca2083d83486a05d8c4456aa4090006e781 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 10 Jan 2020 19:34:19 +0300 Subject: dynamic_configuration renaming and moving it from instance settings --- config/config.exs | 3 ++- config/description.exs | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 103361b29..df677c2e0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -269,7 +269,6 @@ config :pleroma, :instance, remote_post_retention_days: 90, skip_thread_containment: true, limit_to_local_content: :unauthenticated, - dynamic_configuration: false, user_bio_length: 5000, user_name_length: 100, max_account_fields: 10, @@ -623,6 +622,8 @@ config :pleroma, :web_cache_ttl, config :pleroma, :modules, runtime_dir: "instance/modules" +config :pleroma, configurable_from_database: false + config :swarm, node_blacklist: [~r/myhtml_.*$/] # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/config/description.exs b/config/description.exs index 285c8b19c..3c5febf05 100644 --- a/config/description.exs +++ b/config/description.exs @@ -867,12 +867,6 @@ config :pleroma, :config_description, [ false ] }, - %{ - key: :dynamic_configuration, - type: :boolean, - description: - "Allow transferring configuration to DB with the subsequent customization from Admin api. Defaults to `false`" - }, %{ key: :max_account_fields, type: :integer, @@ -3111,5 +3105,18 @@ config :pleroma, :config_description, [ description: "A path to custom Elixir modules (such as MRF policies)." } ] + }, + %{ + group: :pleroma, + type: :group, + description: "Allow instance configuration from database.", + children: [ + %{ + key: :configurable_from_database, + type: :boolean, + description: + "Allow transferring configuration to DB with the subsequent customization from Admin api. Defaults to `false`" + } + ] } ] -- cgit v1.2.3 From 0c9c62509d10c19e2e6d796cb431f1560e9e88b1 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Sat, 11 Jan 2020 17:19:54 +0000 Subject: Remove MDII uploader --- config/config.exs | 4 ---- config/description.exs | 17 ----------------- 2 files changed, 21 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 103361b29..d41abf090 100644 --- a/config/config.exs +++ b/config/config.exs @@ -108,10 +108,6 @@ config :pleroma, Pleroma.Uploaders.S3, streaming_enabled: true, public_endpoint: "https://s3.amazonaws.com" -config :pleroma, Pleroma.Uploaders.MDII, - cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi", - files: "https://mdii.sakura.ne.jp" - config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"], pack_extensions: [".png", ".gif"], diff --git a/config/description.exs b/config/description.exs index 45e4b43f1..1089fd86c 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2557,23 +2557,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: Pleroma.Uploaders.MDII, - type: :group, - children: [ - %{ - key: :cgi, - type: :string, - suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"] - }, - %{ - key: :files, - type: :string, - suggestions: ["https://mdii.sakura.ne.jp"] - } - ] - }, %{ group: :pleroma, key: :http, -- cgit v1.2.3 From 41c7f3490589f0360b4cb9189ed10823d377a7b8 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Tue, 14 Jan 2020 15:00:38 +0300 Subject: short labels and fixes for typos --- config/description.exs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 5de9392d2..f941349d5 100644 --- a/config/description.exs +++ b/config/description.exs @@ -654,6 +654,7 @@ config :pleroma, :config_description, [ }, %{ key: :federation_incoming_replies_max_depth, + label: "Fed. incoming replies max depth", type: :integer, description: "Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while" <> @@ -664,6 +665,7 @@ config :pleroma, :config_description, [ }, %{ key: :federation_reachability_timeout_days, + label: "Fed. reachability timeout days", type: :integer, description: "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it", @@ -1822,7 +1824,7 @@ config :pleroma, :config_description, [ %{ key: :private_key, type: :string, - description: "VAPID private keyn", + description: "VAPID private key", suggestions: ["Private key"] } ] @@ -2511,7 +2513,6 @@ config :pleroma, :config_description, [ "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname" <> " and the value the location or array of locations. * can be used as a wildcard", suggestions: [ - # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md` Custom: ["/emoji/*.png", "/emoji/**/*.png"] ] }, @@ -2525,6 +2526,7 @@ config :pleroma, :config_description, [ }, %{ key: :shared_pack_cache_seconds_per_file, + label: "Shared pack cache s/file", type: :integer, descpiption: "When an emoji pack is shared, the archive is created and cached in memory" <> @@ -2792,8 +2794,8 @@ config :pleroma, :config_description, [ %{ key: :user_agent, type: [:string, :atom], - desctiption: - "what user agent should we use? (default: `:default`), must be string or `:default`", + description: + "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`", suggestions: ["Pleroma", :default] }, %{ -- cgit v1.2.3 From e69986169095796f2845c4f859234d96f91bf9ff Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Sat, 18 Jan 2020 12:25:56 +0300 Subject: full update for some subkeys --- config/config.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 0a8f1465c..12105e672 100644 --- a/config/config.exs +++ b/config/config.exs @@ -112,7 +112,6 @@ config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"], pack_extensions: [".png", ".gif"], groups: [ - # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md` Custom: ["/emoji/*.png", "/emoji/**/*.png"] ], default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json", -- cgit v1.2.3 From efb8ef5abee1a8defa2bfba40ad1065db4c09ddf Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Sat, 18 Jan 2020 16:55:33 +0300 Subject: releases support --- config/releases.exs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config') diff --git a/config/releases.exs b/config/releases.exs index b224960db..79651a342 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -6,6 +6,8 @@ config :pleroma, :modules, runtime_dir: "/var/lib/pleroma/modules" config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs" +config :pleroma, release: true, config_path: config_path + if File.exists?(config_path) do import_config config_path else @@ -18,3 +20,9 @@ else IO.puts(warning) end + +exported_config = Path.join([Path.dirname(config_path), "prod.exported_from_db.secret.exs"]) + +if File.exists?(exported_config) do + import_config exported_config +end -- cgit v1.2.3 From f01ab6cd29aaae39fef6a95ec8490223fb692499 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Tue, 21 Jan 2020 17:49:22 +0300 Subject: some refactor and tests --- config/releases.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/releases.exs b/config/releases.exs index 79651a342..19636765f 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -21,7 +21,10 @@ else IO.puts(warning) end -exported_config = Path.join([Path.dirname(config_path), "prod.exported_from_db.secret.exs"]) +exported_config = + config_path + |> Path.dirname() + |> Path.join("prod.exported_from_db.secret.exs") if File.exists?(exported_config) do import_config exported_config -- cgit v1.2.3 From 795a5fe441df28dec60963a6e619dd678d375676 Mon Sep 17 00:00:00 2001 From: Roman Chvanikov Date: Tue, 21 Jan 2020 19:48:14 +0300 Subject: Add delete_attachments queue to config --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b0036fff0..9be1c721f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -502,7 +502,8 @@ config :pleroma, Oban, mailer: 10, transmogrifier: 20, scheduled_activities: 10, - background: 5 + background: 5, + attachments_cleanup: 5 ] config :pleroma, :workers, -- cgit v1.2.3 From df0b8f1d0802a2536bf436ff8157918929a183cc Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 22 Jan 2020 20:31:42 +0400 Subject: Add new users digest email --- config/config.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b0036fff0..53ea76dd3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -502,7 +502,11 @@ config :pleroma, Oban, mailer: 10, transmogrifier: 20, scheduled_activities: 10, - background: 5 + background: 5, + new_users_digest: 1 + ], + crontab: [ + {"0 0 * * *", Pleroma.Workers.NewUsersDigestWorker} ] config :pleroma, :workers, -- cgit v1.2.3 From aa0f0d4edd4205c2b1d7c4f5a885d57287f6379a Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 22 Jan 2020 20:53:06 +0400 Subject: Disable NewUsersDigestEmail by default --- config/config.exs | 2 ++ config/test.exs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 53ea76dd3..3f0222f0e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -581,6 +581,8 @@ config :pleroma, Pleroma.Emails.UserEmail, text_muted_color: "#b9b9ba" } +config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false + config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics" config :pleroma, Pleroma.ScheduledActivity, diff --git a/config/test.exs b/config/test.exs index 5c66a36f1..9da0ae484 100644 --- a/config/test.exs +++ b/config/test.exs @@ -97,6 +97,8 @@ config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock config :pleroma, :modules, runtime_dir: "test/fixtures/modules" +config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true + if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From cf96c4005743c61d44e17c9d37c6427eaf69c152 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Wed, 22 Jan 2020 21:10:17 +0300 Subject: [#1505] Added Mastodon-compatible `replies` collection to Note federated representation. --- config/config.exs | 4 ++++ config/description.exs | 14 ++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2c154eb45..60642c467 100644 --- a/config/config.exs +++ b/config/config.exs @@ -620,6 +620,10 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false +config :pleroma, :mastodon_compatibility, + # https://git.pleroma.social/pleroma/pleroma/issues/1505 + federated_note_replies_limit: 5 + config :swarm, node_blacklist: [~r/myhtml_.*$/] # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/config/description.exs b/config/description.exs index f941349d5..a0675ec30 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3089,6 +3089,20 @@ config :pleroma, :config_description, [ } ] }, + %{ + group: :pleroma, + key: :mastodon_compatibility, + type: :group, + description: "Mastodon compatibility-related settings.", + children: [ + %{ + key: :federated_note_replies_limit, + type: :integer, + description: + "The number of Note self-reply URIs to be included with outgoing federation (`5` to mimic Mastodon hardcoded value, `0` to disable)." + } + ] + }, %{ group: :pleroma, type: :group, -- cgit v1.2.3 From 3c4a30c6db312aff2afbfcd423498be19c02c68c Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 23 Jan 2020 18:53:11 +0400 Subject: Add NewUsersDigestEmail to config/description.exs --- config/description.exs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index f941349d5..f7fe06f22 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2456,6 +2456,20 @@ config :pleroma, :config_description, [ } ] }, + %{ + group: :pleroma, + key: Pleroma.Emails.NewUsersDigestEmail, + type: :group, + description: "New users admin email digest", + children: [ + %{ + key: :enabled, + type: :boolean, + description: "enables new users admin digest email when `true`", + suggestions: [false] + } + ] + }, %{ group: :pleroma, key: :oauth2, -- cgit v1.2.3 From b0ae69d9968cb130741ed59ae58c7d39e9d42cab Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 24 Jan 2020 11:05:03 +0300 Subject: removing deleted MDII uploader from suggestions --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index f941349d5..730d7d72b 100644 --- a/config/description.exs +++ b/config/description.exs @@ -23,7 +23,7 @@ config :pleroma, :config_description, [ key: :uploader, type: :module, description: "Module which will be used for uploads", - suggestions: [Pleroma.Uploaders.Local, Pleroma.Uploaders.MDII, Pleroma.Uploaders.S3] + suggestions: [Pleroma.Uploaders.Local, Pleroma.Uploaders.S3] }, %{ key: :filters, -- cgit v1.2.3 From e9d8a84790259572e59d79b75947b4ab81dc132b Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 24 Jan 2020 11:19:12 +0300 Subject: better descriptions for email fields for admin-fe --- config/description.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index f941349d5..04174b6b6 100644 --- a/config/description.exs +++ b/config/description.exs @@ -515,6 +515,7 @@ config :pleroma, :config_description, [ }, %{ key: :email, + label: "Admin Email Address", type: :string, description: "Email used to reach an Administrator/Moderator of the instance", suggestions: [ @@ -523,8 +524,9 @@ config :pleroma, :config_description, [ }, %{ key: :notify_email, + label: "Sender Email Address", type: :string, - description: "Email used for notifications", + description: "Envelope FROM address for mail sent via Pleroma", suggestions: [ "notify@example.com" ] -- cgit v1.2.3 From 86e4d23acb640efea8cbc879ddbeadfa0e04f9c8 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sat, 25 Jan 2020 10:47:30 +0300 Subject: [#1505] Background fetching of incoming activities' `replies` collections. --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 60642c467..5f72df8a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -501,6 +501,7 @@ config :pleroma, Oban, transmogrifier: 20, scheduled_activities: 10, background: 5, + remote_fetcher: 2, attachments_cleanup: 5 ] -- cgit v1.2.3 From 5943d78c74c7ee429545a400d2739e58656ec7d7 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Sat, 25 Jan 2020 19:45:51 +0300 Subject: description typos, Oban verbose type fix, new keys --- config/description.exs | 272 +++++++++++++++++++++++++++---------------------- 1 file changed, 153 insertions(+), 119 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 6c931c152..531f5d7e7 100644 --- a/config/description.exs +++ b/config/description.exs @@ -39,7 +39,7 @@ config :pleroma, :config_description, [ key: :link_name, type: :boolean, description: - "If enabled, a name parameter will be added to the url of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`" + "If enabled, a name parameter will be added to the url of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`." }, %{ key: :base_url, @@ -53,7 +53,7 @@ config :pleroma, :config_description, [ key: :proxy_remote, type: :boolean, description: - "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected." + "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected" }, %{ key: :proxy_opts, @@ -73,14 +73,14 @@ config :pleroma, :config_description, [ type: :boolean, description: "Redirects the client to the real remote URL if there's any HTTP errors. " <> - "Any error during body processing will not be redirected as the response is chunked" + "Any error during body processing will not be redirected as the response is chunked." }, %{ key: :max_body_length, type: :integer, description: - "limits the content length to be approximately the " <> - "specified length. It is validated with the `content-length` header and also verified when proxying" + "Limits the content length to be approximately the " <> + "specified length. It is validated with the `content-length` header and also verified when proxying." }, %{ key: :http, @@ -130,7 +130,7 @@ config :pleroma, :config_description, [ %{ key: :uploads, type: :string, - description: "Path where user uploads will be saved", + description: "Path where user's uploads will be saved", suggestions: [ "uploads" ] @@ -207,7 +207,7 @@ config :pleroma, :config_description, [ type: :string, description: "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <> - " filename extension by using {extension}, for example custom-file-name.{extension}", + " filename extension by using {extension}, for example custom-file-name.{extension}.", suggestions: [ "custom-file-name.{extension}" ] @@ -637,12 +637,12 @@ config :pleroma, :config_description, [ %{ key: :registrations_open, type: :boolean, - description: "Enable registrations for anyone, invitations can be enabled when false" + description: "Enable registrations for anyone, invitations can be enabled when `false`" }, %{ key: :invites_enabled, type: :boolean, - description: "Enable user invitations for admins (depends on registrations_open: false)" + description: "Enable user invitations for admins (depends on `registrations_open: false`)" }, %{ key: :account_activation_required, @@ -660,7 +660,7 @@ config :pleroma, :config_description, [ type: :integer, description: "Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while" <> - " fetching very long threads. If set to nil, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes", + " fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes.", suggestions: [ 100 ] @@ -670,7 +670,7 @@ config :pleroma, :config_description, [ label: "Fed. reachability timeout days", type: :integer, description: - "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it", + "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.", suggestions: [ 7 ] @@ -703,13 +703,13 @@ config :pleroma, :config_description, [ type: :boolean, description: "Makes the client API in authentificated mode-only except for user-profiles." <> - " Useful for disabling the Local Timeline and The Whole Known Network" + " Useful for disabling the Local Timeline and The Whole Known Network." }, %{ key: :quarantined_instances, type: {:list, :string}, description: - "List of ActivityPub instances where private(DMs, followers-only) activities will not be send", + "List of ActivityPub instances where private (DMs, followers-only) activities will not be send", suggestions: [ "quarantined.com", "*.quarantined.com" @@ -752,7 +752,7 @@ config :pleroma, :config_description, [ label: "MRF transparency exclusions", type: {:list, :string}, 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.", suggestions: [ "exclusion.com" ] @@ -761,13 +761,13 @@ config :pleroma, :config_description, [ key: :extended_nickname_format, type: :boolean, description: - "Set to true to use extended local nicknames format (allows underscores/dashes)." <> - " This will break federation with older software for theses nicknames" + "Set to `true` to use extended local nicknames format (allows underscores/dashes)." <> + " This will break federation with older software for theses nicknames." }, %{ key: :max_pinned_statuses, type: :integer, - description: "The maximum number of pinned statuses. 0 will disable the feature", + description: "The maximum number of pinned statuses. 0 will disable the feature.", suggestions: [ 0, 1, @@ -790,13 +790,13 @@ config :pleroma, :config_description, [ key: :no_attachment_links, type: :boolean, description: - "Set to true to disable automatically adding attachment link text to statuses" + "Set to `true` to disable automatically adding attachment link text to statuses" }, %{ key: :welcome_message, type: :string, description: - "A message that will be send to a newly registered users as a direct message", + "A message that will be sent to a newly registered users as a direct message", suggestions: [ "Hi, @username! Welcome on board!" ] @@ -812,7 +812,7 @@ config :pleroma, :config_description, [ %{ key: :max_report_comment_size, type: :integer, - description: "The maximum size of the report comment (Default: 1000)", + description: "The maximum size of the report comment. Default: 1000.", suggestions: [ 1_000 ] @@ -821,14 +821,14 @@ config :pleroma, :config_description, [ key: :safe_dm_mentions, type: :boolean, description: - "If set to true, only mentions at the beginning of a post will be used to address people in direct messages." <> - " This is to prevent accidental mentioning of people when talking about them (e.g. \"@friend hey i really don't like @enemy\")." <> - " Default: false" + "If set to `true`, only mentions at the beginning of a post will be used to address people in direct messages." <> + " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <> + " Default: `false`" }, %{ key: :healthcheck, type: :boolean, - description: "If set to true, system data will be shown on /api/pleroma/healthcheck" + description: "If set to `true`, system data will be shown on /api/pleroma/healthcheck" }, %{ key: :remote_post_retention_days, @@ -842,7 +842,7 @@ config :pleroma, :config_description, [ %{ key: :user_bio_length, type: :integer, - description: "A user bio maximum length (default: 5000)", + description: "A user bio maximum length. Default: 5000.", suggestions: [ 5_000 ] @@ -850,7 +850,7 @@ config :pleroma, :config_description, [ %{ key: :user_name_length, type: :integer, - description: "A user name maximum length (default: 100)", + description: "A user name maximum length. Default: 100.", suggestions: [ 100 ] @@ -858,13 +858,13 @@ config :pleroma, :config_description, [ %{ key: :skip_thread_containment, type: :boolean, - description: "Skip filter out broken threads. The default is true" + description: "Skip filter out broken threads. Default: `true`" }, %{ key: :limit_to_local_content, type: [:atom, false], description: - "Limit unauthenticated users to search for local statutes and users only. The default is :unauthenticated ", + "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.", suggestions: [ :unauthenticated, :all, @@ -874,7 +874,7 @@ config :pleroma, :config_description, [ %{ key: :max_account_fields, type: :integer, - description: "The maximum number of custom fields in the user profile (default: 10)", + description: "The maximum number of custom fields in the user profile. Default: 10.", suggestions: [ 10 ] @@ -883,7 +883,7 @@ config :pleroma, :config_description, [ key: :max_remote_account_fields, type: :integer, description: - "The maximum number of custom fields in the remote user profile (default: 20)", + "The maximum number of custom fields in the remote user profile. Default: 20.", suggestions: [ 20 ] @@ -891,7 +891,7 @@ config :pleroma, :config_description, [ %{ key: :account_field_name_length, type: :integer, - description: "An account field name maximum length (default: 512)", + description: "An account field name maximum length. Default: 512.", suggestions: [ 512 ] @@ -899,7 +899,7 @@ config :pleroma, :config_description, [ %{ key: :account_field_value_length, type: :integer, - description: "An account field value maximum length (default: 2048)", + description: "An account field value maximum length. Default: 2048.", suggestions: [ 2048 ] @@ -920,7 +920,7 @@ config :pleroma, :config_description, [ key: :backends, type: [:atom, :tuple, :module], description: - "Where logs will be send, :console - send logs to stdout, {ExSyslogger, :ex_syslogger} - to syslog, Quack.Logger - to Slack.", + "Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.", suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger] } ] @@ -947,7 +947,7 @@ config :pleroma, :config_description, [ %{ key: :format, type: :string, - description: "It defaults to \"$date $time [$level] $levelpad$node $metadata $message\"", + description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\".", suggestions: ["$metadata[$level] $message"] }, %{ @@ -972,7 +972,7 @@ config :pleroma, :config_description, [ %{ key: :format, type: :string, - description: "It defaults to \"$date $time [$level] $levelpad$node $metadata $message\"", + description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\".", suggestions: ["$metadata[$level] $message"] }, %{ @@ -1026,7 +1026,7 @@ config :pleroma, :config_description, [ description: "This form can be used to configure a keyword list that keeps the configuration data for any " <> "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <> - "add your own configuration your settings need to be complete as they will override the defaults.", + "add your own configuration your settings all fields must be complete.", children: [ %{ key: :pleroma_fe, @@ -1048,7 +1048,11 @@ config :pleroma, :config_description, [ hideUserStats: false, scopeCopy: true, subjectLineBehavior: "email", - alwaysShowSubjectInput: true + alwaysShowSubjectInput: true, + logoMask: false, + logoMargin: ".1em", + stickers: false, + enableEmojiPicker: false } ], children: [ @@ -1076,7 +1080,7 @@ config :pleroma, :config_description, [ label: "Redirect root no login", type: :string, description: - "relative URL which indicates where to redirect when a user isn't logged in", + "Relative URL which indicates where to redirect when a user isn't logged in", suggestions: ["/main/all"] }, %{ @@ -1084,7 +1088,7 @@ config :pleroma, :config_description, [ label: "Redirect root login", type: :string, description: - "relative URL which indicates where to redirect when a user is logged in", + "Relative URL which indicates where to redirect when a user is logged in", suggestions: ["/main/friends"] }, %{ @@ -1097,34 +1101,34 @@ config :pleroma, :config_description, [ key: :scopeOptionsEnabled, label: "Scope options enabled", type: :boolean, - description: "Enable setting an notice visibility and subject/CW when posting" + description: "Enable setting a notice visibility and subject/CW when posting" }, %{ key: :formattingOptionsEnabled, label: "Formatting options enabled", type: :boolean, description: - "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to :instance, allowed_post_formats" + "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`" }, %{ key: :collapseMessageWithSubject, label: "Collapse message with subject", type: :boolean, description: - "When a message has a subject(aka Content Warning), collapse it by default" + "When a message has a subject (aka Content Warning), collapse it by default" }, %{ key: :hidePostStats, label: "Hide post stats", type: :boolean, - description: "Hide notices statistics(repeats, favorites, ...)" + description: "Hide notices statistics (repeats, favorites, ...)" }, %{ key: :hideUserStats, label: "Hide user stats", type: :boolean, description: - "Hide profile statistics(posts, posts per day, followers, followings, ...)" + "Hide profile statistics (posts, posts per day, followers, followings, ...)" }, %{ key: :scopeCopy, @@ -1137,16 +1141,46 @@ config :pleroma, :config_description, [ label: "Subject line behavior", type: :string, description: "Allows changing the default behaviour of subject lines in replies. - `email`: Copy and preprend re:, as in email, - `masto`: Copy verbatim, as in Mastodon, - `noop`: Don't copy the subjec", + `email`: copy and preprend re:, as in email, + `masto`: copy verbatim, as in Mastodon, + `noop`: don't copy the subject.", suggestions: ["email", "masto", "noop"] }, %{ key: :alwaysShowSubjectInput, label: "Always show subject input", type: :boolean, - description: "When set to false, auto-hide the subject field when it's empty" + description: "When set to `false`, auto-hide the subject field when it's empty" + }, + %{ + key: :logoMask, + label: "Logo mask", + type: :boolean, + description: + "By default it assumes logo used will be monochrome-with-alpha one, this is done to be compatible with both light and dark themes, " <> + "so that white logo designed with dark theme in mind won't be invisible over light theme, this is done via CSS3 Masking. " <> + "Basically - it will take alpha channel of the image and fill non-transparent areas of it with solid color. " <> + "If you really want colorful logo - it can be done by setting logoMask to false." + }, + %{ + key: :logoMargin, + label: "Logo margin", + type: :string, + description: + "allows you to adjust vertical margins between logo boundary and navbar borders. " <> + "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.", + suggestions: [".1em"] + }, + %{ + key: :stickers, + type: :boolean, + description: "Enables/disables stickers." + }, + %{ + key: :enableEmojiPicker, + label: "Emoji picker", + type: :boolean, + description: "Enables/disables emoji picker." } ] }, @@ -1182,7 +1216,7 @@ config :pleroma, :config_description, [ key: :mascots, type: {:keyword, :map}, description: - "Keyword of mascots, each element MUST contain both a url and a mime_type key", + "Keyword of mascots, each element must contain both an url and a mime_type key", suggestions: [ pleroma_fox_tan: %{ url: "/images/pleroma-fox-tan-smol.png", @@ -1198,7 +1232,7 @@ config :pleroma, :config_description, [ key: :default_mascot, type: :atom, description: - "This will be used as the default mascot on MastoFE (default: :pleroma_fox_tan)", + "This will be used as the default mascot on MastoFE. Default: `:pleroma_fox_tan`", suggestions: [ :pleroma_fox_tan ] @@ -1261,7 +1295,7 @@ config :pleroma, :config_description, [ key: :media_nsfw, label: "Media NSFW", type: {:list, :string}, - description: "List of instances to put medias as NSFW(sensitive) from", + description: "List of instances to put medias as NSFW (sensitive) from", suggestions: ["example.com", "*.example.com"] }, %{ @@ -1336,12 +1370,12 @@ config :pleroma, :config_description, [ key: :allow_followersonly, label: "Allow followers-only", type: :boolean, - description: "whether to allow followers-only posts" + description: "Whether to allow followers-only posts" }, %{ key: :allow_direct, type: :boolean, - description: "whether to allow direct messages" + description: "Whether to allow direct messages" } ] }, @@ -1357,14 +1391,14 @@ config :pleroma, :config_description, [ type: :integer, description: "Number of mentioned users after which the message gets delisted (the message can still be seen, " <> - " but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable", + " but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable.", suggestions: [10] }, %{ key: :reject_threshold, type: :integer, description: - "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable", + "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.", suggestions: [20] } ] @@ -1380,14 +1414,14 @@ config :pleroma, :config_description, [ key: :reject, type: [:string, :regex], description: - "A list of patterns which result in message being rejected, each pattern can be a string or a regular expression", + "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], 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", + "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] }, %{ @@ -1466,7 +1500,7 @@ config :pleroma, :config_description, [ key: :base_url, type: :string, description: - "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts", + "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.", suggestions: ["https://example.com"] }, %{ @@ -1487,14 +1521,14 @@ config :pleroma, :config_description, [ type: :boolean, description: "Redirects the client to the real remote URL if there's any HTTP errors. " <> - "Any error during body processing will not be redirected as the response is chunked" + "Any error during body processing will not be redirected as the response is chunked." }, %{ key: :max_body_length, type: :integer, description: - "limits the content length to be approximately the " <> - "specified length. It is validated with the `content-length` header and also verified when proxying" + "Limits the content length to be approximately the " <> + "specified length. It is validated with the `content-length` header and also verified when proxying." }, %{ key: :http, @@ -1812,9 +1846,9 @@ config :pleroma, :config_description, [ key: :subject, type: :string, description: - "a mailto link for the administrative contact." <> + "A mailto link for the administrative contact." <> " It's best if this email is not a personal email address, but rather a group email so that if a person leaves an organization," <> - " is unavailable for an extended period, or otherwise can't respond, someone else on the list can", + " is unavailable for an extended period, or otherwise can't respond, someone else on the list can.", suggestions: ["Subject"] }, %{ @@ -1862,12 +1896,12 @@ config :pleroma, :config_description, [ type: :group, description: "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <> - " here: https://github.com/koto-bank/kocaptcha. The default endpoint https://captcha.kotobank.ch is hosted by the developer", + " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.", children: [ %{ key: :endpoint, type: :string, - description: "the kocaptcha endpoint to use", + description: "The kocaptcha endpoint to use", suggestions: ["https://captcha.kotobank.ch"] } ] @@ -1876,7 +1910,7 @@ config :pleroma, :config_description, [ group: :pleroma, type: :group, description: - "Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the 'admin_token' parameter", + "Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the `admin_token` parameter", children: [ %{ key: :admin_token, @@ -1926,8 +1960,9 @@ config :pleroma, :config_description, [ }, %{ key: :verbose, - type: :boolean, - description: "Logs verbose mode" + type: :atom, + description: "Logs verbose mode", + suggestions: [false, :error, :warn, :info, :debug] }, %{ key: :prune, @@ -2042,7 +2077,7 @@ config :pleroma, :config_description, [ key: :unfurl_nsfw, label: "Unfurl NSFW", type: :boolean, - description: "If set to true nsfw attachments will be shown in previews" + description: "If set to `true` NSFW attachments will be shown in previews" } ] }, @@ -2086,7 +2121,7 @@ config :pleroma, :config_description, [ key: :ttl_setters, label: "TTL setters", type: {:list, :module}, - description: "List of rich media ttl setters.", + description: "List of rich media TTL setters.", suggestions: [ Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl ] @@ -2103,12 +2138,12 @@ config :pleroma, :config_description, [ key: :enabled, type: :boolean, description: - "if enabled, when a new user is federated with, fetch some of their latest posts" + "If enabled, when a new user is federated with, fetch some of their latest posts" }, %{ key: :pages, type: :integer, - description: "the amount of pages to fetch", + description: "The amount of pages to fetch", suggestions: [5] } ] @@ -2122,24 +2157,24 @@ config :pleroma, :config_description, [ %{ key: :class, type: [:string, false], - description: "specify the class to be added to the generated link. false to clear", + description: "Specify the class to be added to the generated link. `False` to clear", suggestions: ["auto-linker", false] }, %{ key: :rel, type: [:string, false], - description: "override the rel attribute. false to clear", + description: "Override the rel attribute. `False` to clear", suggestions: ["ugc", "noopener noreferrer", false] }, %{ key: :new_window, type: :boolean, - description: "set to false to remove target='_blank' attribute" + description: "Set to `false` to remove target='_blank' attribute" }, %{ key: :scheme, type: :boolean, - description: "Set to true to link urls with schema http://google.com" + description: "Set to `true` to link urls with schema http://google.com" }, %{ key: :truncate, @@ -2156,7 +2191,7 @@ config :pleroma, :config_description, [ %{ key: :extra, type: :boolean, - description: "link urls with rarely used schemes (magnet, ipfs, irc, etc.)" + description: "Link urls with rarely used schemes (magnet, ipfs, irc, etc.)" } ] }, @@ -2170,20 +2205,20 @@ config :pleroma, :config_description, [ key: :daily_user_limit, type: :integer, description: - "the number of scheduled activities a user is allowed to create in a single day (Default: 25)", + "The number of scheduled activities a user is allowed to create in a single day. Default: 25.", suggestions: [25] }, %{ key: :total_user_limit, type: :integer, description: - "the number of scheduled activities a user is allowed to create in total (Default: 300)", + "The number of scheduled activities a user is allowed to create in total. Default: 300.", suggestions: [300] }, %{ key: :enabled, type: :boolean, - description: "whether scheduled activities are sent to the job queue to be executed" + description: "Whether scheduled activities are sent to the job queue to be executed" } ] }, @@ -2196,7 +2231,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "whether expired activities will be sent to the job queue to be deleted" + description: "Whether expired activities will be sent to the job queue to be deleted" } ] }, @@ -2218,14 +2253,14 @@ config :pleroma, :config_description, [ type: :group, description: "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <> - " will be verified by trying to authenticate (bind) to an LDAP server." <> + " will be verified by trying to authenticate (bind) to a LDAP server." <> " If a user exists in the LDAP directory but there is no account with the same name yet on the" <> " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.", children: [ %{ key: :enabled, type: :boolean, - description: "enables LDAP authentication" + description: "Enables LDAP authentication" }, %{ key: :host, @@ -2243,13 +2278,13 @@ config :pleroma, :config_description, [ key: :ssl, label: "SSL", type: :boolean, - description: "true to use SSL, usually implies the port 636" + description: "`True` to use SSL, usually implies the port 636" }, %{ key: :sslopts, label: "SSL options", type: :keyword, - description: "additional SSL options", + description: "Additional SSL options", suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer], children: [ %{ @@ -2270,13 +2305,13 @@ config :pleroma, :config_description, [ key: :tls, label: "TLS", type: :boolean, - description: "true to start TLS, usually implies the port 389" + description: "`True` to start TLS, usually implies the port 389" }, %{ key: :tlsopts, label: "TLS options", type: :keyword, - description: "additional TLS options", + description: "Additional TLS options", suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer], children: [ %{ @@ -2327,23 +2362,23 @@ config :pleroma, :config_description, [ key: :auth_template, type: :string, description: - "authentication form template. By default it's show.html which corresponds to lib/pleroma/web/templates/o_auth/o_auth/show.html.ee", + "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.", suggestions: ["show.html"] }, %{ key: :oauth_consumer_template, type: :string, description: - "OAuth consumer mode authentication form template. By default it's consumer.html which corresponds to" <> - " lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex", + "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <> + " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.", suggestions: ["consumer.html"] }, %{ key: :oauth_consumer_strategies, type: {:list, :string}, description: - "the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <> - " Each entry in this space-delimited string should be of format or :" <> + "The list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <> + " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <> " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_).", suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"] } @@ -2372,13 +2407,13 @@ config :pleroma, :config_description, [ %{ key: :active, type: :boolean, - description: "globally enable or disable digest emails" + description: "Globally enable or disable digest emails" }, %{ key: :schedule, type: :string, description: - "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\"", + "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".", suggestions: ["0 0 * * 0"] }, %{ @@ -2406,7 +2441,7 @@ config :pleroma, :config_description, [ %{ key: :logo, type: :string, - description: "a path to a custom logo. Set it to nil to use the default Pleroma logo", + description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.", suggestions: ["some/path/logo.png"] }, %{ @@ -2479,13 +2514,13 @@ config :pleroma, :config_description, [ %{ key: :clean_expired_tokens, type: :boolean, - description: "Enable a background job to clean expired oauth tokens. Defaults to false" + description: "Enable a background job to clean expired oauth tokens. Default: `false`." }, %{ key: :clean_expired_tokens_interval, type: :integer, description: - "Interval to run the job to clean expired tokens. Defaults to 86_400_000 (24 hours).", + "Interval to run the job to clean expired tokens. Default: 86_400_000 (24 hours).", suggestions: [86_400_000] } ] @@ -2498,7 +2533,7 @@ config :pleroma, :config_description, [ %{ key: :shortcode_globs, type: {:list, :string}, - description: "Location of custom emoji files. * can be used as a wildcard", + description: "Location of custom emoji files. * can be used as a wildcard.", suggestions: ["/emoji/custom/**/*.png"] }, %{ @@ -2512,8 +2547,8 @@ config :pleroma, :config_description, [ key: :groups, type: {:keyword, :string, {:list, :string}}, description: - "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname" <> - " and the value the location or array of locations. * can be used as a wildcard", + "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.", suggestions: [ Custom: ["/emoji/*.png", "/emoji/**/*.png"] ] @@ -2523,7 +2558,7 @@ config :pleroma, :config_description, [ type: :string, description: "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <> - " Currently only one manifest can be added (no arrays)", + " Currently only one manifest can be added (no arrays).", suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"] }, %{ @@ -2546,7 +2581,7 @@ config :pleroma, :config_description, [ %{ key: :rum_enabled, type: :boolean, - description: "If RUM indexes should be used. Defaults to false" + description: "If RUM indexes should be used. Default: `false`" } ] }, @@ -2560,45 +2595,45 @@ config :pleroma, :config_description, [ %{ key: :search, type: [:tuple, {:list, :tuple}], - description: "for the search requests (account & status search etc.)", + description: "For the search requests (account & status search etc.)", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, %{ key: :app_account_creation, type: [:tuple, {:list, :tuple}], - description: "for registering user accounts from the same IP address", + description: "For registering user accounts from the same IP address", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, %{ key: :relations_actions, type: [:tuple, {:list, :tuple}], - description: "for actions on relations with all users (follow, unfollow)", + description: "For actions on relations with all users (follow, unfollow)", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, %{ key: :relation_id_action, type: [:tuple, {:list, :tuple}], - description: "for actions on relation with a specific user (follow, unfollow)", + description: "For actions on relation with a specific user (follow, unfollow)", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, %{ key: :statuses_actions, type: [:tuple, {:list, :tuple}], description: - "for create / delete / fav / unfav / reblog / unreblog actions on any statuses", + "For create / delete / fav / unfav / reblog / unreblog actions on any statuses", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, %{ key: :status_id_action, type: [:tuple, {:list, :tuple}], description: - "for fav / unfav or reblog / unreblog actions on the same status by the same user", + "For fav / unfav or reblog / unreblog actions on the same status by the same user", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, %{ key: :authentication, type: [:tuple, {:list, :tuple}], - description: "for authentication create / password check / user existence check requests", + description: "For authentication create / password check / user existence check requests", suggestions: [{60_000, 15}] } ] @@ -2613,12 +2648,12 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables ssh" + description: "Enables SSH" }, %{ key: :priv_dir, type: :string, - description: "Dir with ssh keys", + description: "Dir with SSH keys", suggestions: ["/some/path/ssh_keys"] }, %{ @@ -2797,7 +2832,7 @@ config :pleroma, :config_description, [ key: :user_agent, type: [:string, :atom], description: - "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`", + "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.", suggestions: ["Pleroma", :default] }, %{ @@ -2969,19 +3004,19 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enable/disable the plug. Defaults to `false`." + description: "Enable/disable the plug. Default: `false`." }, %{ key: :headers, type: {:list, :string}, description: - "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Defaults to `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`." + "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Default: `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`." }, %{ key: :proxies, type: {:list, :string}, description: - "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Defaults to `[]`." + "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Default: `[]`." }, %{ key: :reserved, @@ -3002,14 +3037,13 @@ config :pleroma, :config_description, [ key: :activity_pub, type: :integer, description: - "activity pub routes (except question activities). Defaults to `nil` (no expiration).", - suggestions: [30_000] + "Activity pub routes (except question activities). Default: `nil` (no expiration).", + suggestions: [30_000, nil] }, %{ key: :activity_pub_question, type: :integer, - description: - "activity pub routes (question activities). Defaults to `30_000` (30 seconds).", + description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).", suggestions: [30_000] } ] -- cgit v1.2.3 From f72727a40992d518eb2d2c5a1ad7ade15cd57a8f Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Mon, 27 Jan 2020 12:53:21 +0300 Subject: little fixes --- config/description.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 531f5d7e7..b9b696e42 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1167,7 +1167,7 @@ config :pleroma, :config_description, [ label: "Logo margin", type: :string, description: - "allows you to adjust vertical margins between logo boundary and navbar borders. " <> + "Allows you to adjust vertical margins between logo boundary and navbar borders. " <> "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.", suggestions: [".1em"] }, @@ -1960,7 +1960,7 @@ config :pleroma, :config_description, [ }, %{ key: :verbose, - type: :atom, + type: [:atom, false], description: "Logs verbose mode", suggestions: [false, :error, :warn, :info, :debug] }, -- cgit v1.2.3 From dabd535e436789e64f6630460bfadd2f49dcf069 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Mon, 27 Jan 2020 13:21:50 +0000 Subject: Remove user recommendation by third party engine --- config/config.exs | 8 -------- config/description.exs | 37 ------------------------------------- 2 files changed, 45 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2c154eb45..f4e307e18 100644 --- a/config/config.exs +++ b/config/config.exs @@ -425,14 +425,6 @@ config :pleroma, Pleroma.Web.Metadata, ], unfurl_nsfw: false -config :pleroma, :suggestions, - enabled: false, - third_party_engine: - "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}", - timeout: 300_000, - limit: 40, - web: "https://vinayaka.distsn.org" - config :pleroma, :http_security, enabled: true, sts: false, diff --git a/config/description.exs b/config/description.exs index b9b696e42..5f3c58b08 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2748,43 +2748,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :suggestions, - type: :group, - children: [ - %{ - key: :enabled, - type: :boolean, - description: "Enables suggestions" - }, - %{ - key: :third_party_engine, - type: :string, - description: "URL for third party engine", - suggestions: [ - "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}" - ] - }, - %{ - key: :timeout, - type: :integer, - description: "Request timeout to third party engine", - suggestions: [300_000] - }, - %{ - key: :limit, - type: :integer, - description: "Limit for suggestions", - suggestions: [40] - }, - %{ - key: :web, - type: :string, - suggestions: ["https://vinayaka.distsn.org"] - } - ] - }, %{ group: :prometheus, key: Pleroma.Web.Endpoint.MetricsExporter, -- cgit v1.2.3 From 7499805abf989fe0b5cb10c9da112c5f7371c882 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 29 Jan 2020 23:58:15 +0300 Subject: config.exs: Re-enable rate limiter and enable remote ip --- config/config.exs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index f4e307e18..c57ef1bf7 100644 --- a/config/config.exs +++ b/config/config.exs @@ -596,11 +596,21 @@ config :pleroma, :env, Mix.env() config :http_signatures, adapter: Pleroma.Signature -config :pleroma, :rate_limit, authentication: {60_000, 15} +config :pleroma, :rate_limit, + authentication: {60_000, 15}, + search: [{1000, 10}, {1000, 30}], + app_account_creation: {1_800_000, 25}, + relations_actions: {10_000, 10}, + relation_id_action: {60_000, 2}, + statuses_actions: {10_000, 15}, + status_id_action: {60_000, 3}, + password_reset: {1_800_000, 5}, + account_confirmation_resend: {8_640_000, 5}, + ap_routes: {60_000, 15} config :pleroma, Pleroma.ActivityExpiration, enabled: true -config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false +config :pleroma, Pleroma.Plugs.RemoteIp, enabled: true config :pleroma, :static_fe, enabled: false -- cgit v1.2.3 From 8057157ee3172c370200f328373f0a7e32092b91 Mon Sep 17 00:00:00 2001 From: Roman Chvanikov Date: Fri, 31 Jan 2020 01:20:37 +0300 Subject: Make attachments cleanup optional --- config/config.exs | 3 ++- config/description.exs | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c57ef1bf7..60c982557 100644 --- a/config/config.exs +++ b/config/config.exs @@ -271,7 +271,8 @@ config :pleroma, :instance, account_field_name_length: 512, account_field_value_length: 2048, external_user_synchronization: true, - extended_nickname_format: true + extended_nickname_format: true, + cleanup_attachments: false config :pleroma, :feed, post_title: %{ diff --git a/config/description.exs b/config/description.exs index 5f3c58b08..1ffb66287 100644 --- a/config/description.exs +++ b/config/description.exs @@ -764,6 +764,15 @@ config :pleroma, :config_description, [ "Set to `true` to use extended local nicknames format (allows underscores/dashes)." <> " This will break federation with older software for theses nicknames." }, + %{ + key: :cleanup_attachments, + type: :boolean, + description: """ + "Set to `true` to remove associated attachments when status is removed. + This will not affect duplicates and attachments without status. + Enabling this will increase load to database when deleting statuses on larger instances. + """ + }, %{ key: :max_pinned_statuses, type: :integer, -- cgit v1.2.3 From 3909b5b7b34bbf879fd7809eef6ec0ae286c2ef2 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 5 Feb 2020 21:13:56 +0400 Subject: Remove AutoLinker `scheme` option from the config --- config/config.exs | 1 - config/description.exs | 5 ----- 2 files changed, 6 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c57ef1bf7..d01dd8d74 100644 --- a/config/config.exs +++ b/config/config.exs @@ -508,7 +508,6 @@ config :pleroma, :fetch_initial_posts, config :auto_linker, opts: [ - scheme: true, extra: true, # TODO: Set to :no_scheme when it works properly validate_tld: true, diff --git a/config/description.exs b/config/description.exs index 5f3c58b08..a0cb03e48 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2171,11 +2171,6 @@ config :pleroma, :config_description, [ type: :boolean, description: "Set to `false` to remove target='_blank' attribute" }, - %{ - key: :scheme, - type: :boolean, - description: "Set to `true` to link urls with schema http://google.com" - }, %{ key: :truncate, type: [:integer, false], -- cgit v1.2.3 From bdf0a87be95f311b094273d67244914173ee9dac Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Wed, 5 Feb 2020 19:05:20 +0300 Subject: dropdown type --- config/description.exs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index a4d1a74a7..0ac1f4d8d 100644 --- a/config/description.exs +++ b/config/description.exs @@ -871,7 +871,7 @@ config :pleroma, :config_description, [ }, %{ key: :limit_to_local_content, - type: [:atom, false], + type: {:dropdown, :atom}, description: "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.", suggestions: [ @@ -942,7 +942,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :level, - type: :atom, + type: {:dropdown, :atom}, description: "Log level", suggestions: [:debug, :info, :warn, :error] }, @@ -974,7 +974,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :level, - type: :atom, + type: {:dropdown, :atom}, description: "Log level", suggestions: [:debug, :info, :warn, :error] }, @@ -998,7 +998,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :level, - type: :atom, + type: {:dropdown, :atom}, description: "Log level", suggestions: [:debug, :info, :warn, :error] }, @@ -1969,7 +1969,7 @@ config :pleroma, :config_description, [ }, %{ key: :verbose, - type: [:atom, false], + type: {:dropdown, :atom}, description: "Logs verbose mode", suggestions: [false, :error, :warn, :info, :debug] }, -- cgit v1.2.3 From 7a2e153a8dec4337f16aeacab534f26f720cb5eb Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Thu, 6 Feb 2020 13:15:23 +0300 Subject: description change --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 0ac1f4d8d..6b912a07e 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2178,7 +2178,7 @@ config :pleroma, :config_description, [ %{ key: :new_window, type: :boolean, - description: "Set to `false` to remove target='_blank' attribute" + description: "Link urls will open in new window/tab" }, %{ key: :truncate, -- cgit v1.2.3 From d458f4fdcafe847a7db8b1c663cfd945019816b7 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sat, 8 Feb 2020 19:58:02 +0300 Subject: [#1505] Added tests, changelog entry, tweaked config settings related to replies output on outgoing federation. --- config/config.exs | 5 +---- config/description.exs | 20 ++++++-------------- 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 370828c1c..62a10ca41 100644 --- a/config/config.exs +++ b/config/config.exs @@ -340,6 +340,7 @@ config :pleroma, :activitypub, unfollow_blocked: true, outgoing_blocks: true, follow_handshake_timeout: 500, + note_replies_output_limit: 5, sign_object_fetches: true config :pleroma, :streamer, @@ -624,10 +625,6 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false -config :pleroma, :mastodon_compatibility, - # https://git.pleroma.social/pleroma/pleroma/issues/1505 - federated_note_replies_limit: 5 - config :swarm, node_blacklist: [~r/myhtml_.*$/] # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/config/description.exs b/config/description.exs index 909ae00d9..9fd52f50e 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1790,6 +1790,12 @@ config :pleroma, :config_description, [ type: :boolean, description: "Sign object fetches with HTTP signatures" }, + %{ + key: :note_replies_output_limit, + type: :integer, + description: + "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)." + }, %{ key: :follow_handshake_timeout, type: :integer, @@ -3097,20 +3103,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :mastodon_compatibility, - type: :group, - description: "Mastodon compatibility-related settings.", - children: [ - %{ - key: :federated_note_replies_limit, - type: :integer, - description: - "The number of Note self-reply URIs to be included with outgoing federation (`5` to mimic Mastodon hardcoded value, `0` to disable)." - } - ] - }, %{ group: :pleroma, type: :group, -- cgit v1.2.3 From bfd16fe41e1d135bcacdaa9e49e6b8ad8e8ff8ea Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Tue, 11 Feb 2020 12:19:06 +0300 Subject: set oban crontab to false in tests --- config/test.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index ce4586c7b..078c46205 100644 --- a/config/test.exs +++ b/config/test.exs @@ -66,7 +66,8 @@ config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock config :pleroma, Oban, queues: false, - prune: :disabled + prune: :disabled, + crontab: false config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 2, -- cgit v1.2.3 From ea1631d7e67e22eb49d608e066ef4a3555bf25f7 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 11 Feb 2020 00:29:25 +0300 Subject: Make Floki use fast_html --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 41c1ff637..364aaf776 100644 --- a/config/config.exs +++ b/config/config.exs @@ -612,6 +612,8 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false +config :floki, :html_parser, Floki.HTMLParser.FastHtml + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" -- cgit v1.2.3 From 237b2068f9bb23c590420fda3ac677badd9d839f Mon Sep 17 00:00:00 2001 From: feld Date: Tue, 11 Feb 2020 16:55:18 +0000 Subject: Revert "Merge branch 'feat/floki-fasthtml' into 'develop'" This reverts merge request !2194 --- config/config.exs | 2 -- 1 file changed, 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 364aaf776..41c1ff637 100644 --- a/config/config.exs +++ b/config/config.exs @@ -612,8 +612,6 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false -config :floki, :html_parser, Floki.HTMLParser.FastHtml - # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" -- cgit v1.2.3 From 50d9fcbe29acae63ad2aec4eadedf7b9ba614428 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Tue, 11 Feb 2020 23:33:05 +0400 Subject: Hotlink logo instead of attachment --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 06ae2f262..e97443028 100644 --- a/config/config.exs +++ b/config/config.exs @@ -488,7 +488,7 @@ config :pleroma, Oban, {"0 * * * *", Pleroma.Workers.Cron.StatsWorker}, {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker}, {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker}, - {"0 0 * * *", Pleroma.Workers.NewUsersDigestWorker} + {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker} ] config :pleroma, :workers, -- cgit v1.2.3 From 9581d573828b4f6d853d6715507a55178bc8356d Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 11 Feb 2020 15:21:36 -0600 Subject: First round at cleaning up descriptions --- config/description.exs | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index e5bac9b3f..921316d07 100644 --- a/config/description.exs +++ b/config/description.exs @@ -637,22 +637,22 @@ config :pleroma, :config_description, [ %{ key: :registrations_open, type: :boolean, - description: "Enable registrations for anyone, invitations can be enabled when `false`" + description: "Enable registrations for anyone. Invitations require this setting to be disabled." }, %{ key: :invites_enabled, type: :boolean, - description: "Enable user invitations for admins (depends on `registrations_open: false`)" + description: "Enable user invitations for admins (depends on `registrations_open` being disabled)." }, %{ key: :account_activation_required, type: :boolean, - description: "Require users to confirm their emails before signing in" + description: "Require users to confirm their emails before signing in." }, %{ key: :federating, type: :boolean, - description: "Enable federation with other instances" + description: "Enable federation with other instances." }, %{ key: :federation_incoming_replies_max_depth, @@ -761,14 +761,14 @@ config :pleroma, :config_description, [ key: :extended_nickname_format, type: :boolean, description: - "Set to `true` to use extended local nicknames format (allows underscores/dashes)." <> + "Enable to use extended local nicknames format (allows underscores/dashes)." <> " This will break federation with older software for theses nicknames." }, %{ key: :cleanup_attachments, type: :boolean, description: """ - "Set to `true` to remove associated attachments when status is removed. + "Enable to remove associated attachments when status is removed. This will not affect duplicates and attachments without status. Enabling this will increase load to database when deleting statuses on larger instances. """ @@ -799,7 +799,7 @@ config :pleroma, :config_description, [ key: :no_attachment_links, type: :boolean, description: - "Set to `true` to disable automatically adding attachment link text to statuses" + "Enable to disable automatically adding attachment link text to statuses" }, %{ key: :welcome_message, @@ -830,14 +830,14 @@ config :pleroma, :config_description, [ key: :safe_dm_mentions, type: :boolean, description: - "If set to `true`, only mentions at the beginning of a post will be used to address people in direct messages." <> + "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <> " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <> - " Default: `false`" + " Default: disabled" }, %{ key: :healthcheck, type: :boolean, - description: "If set to `true`, system data will be shown on /api/pleroma/healthcheck" + description: "If enabled, system data will be shown on /api/pleroma/healthcheck" }, %{ key: :remote_post_retention_days, @@ -867,7 +867,7 @@ config :pleroma, :config_description, [ %{ key: :skip_thread_containment, type: :boolean, - description: "Skip filter out broken threads. Default: `true`" + description: "Skip filtering out broken threads. Default: enabled" }, %{ key: :limit_to_local_content, @@ -1159,17 +1159,15 @@ config :pleroma, :config_description, [ key: :alwaysShowSubjectInput, label: "Always show subject input", type: :boolean, - description: "When set to `false`, auto-hide the subject field when it's empty" + description: "When disabled, auto-hide the subject field if it's empty" }, %{ key: :logoMask, label: "Logo mask", type: :boolean, description: - "By default it assumes logo used will be monochrome-with-alpha one, this is done to be compatible with both light and dark themes, " <> - "so that white logo designed with dark theme in mind won't be invisible over light theme, this is done via CSS3 Masking. " <> - "Basically - it will take alpha channel of the image and fill non-transparent areas of it with solid color. " <> - "If you really want colorful logo - it can be done by setting logoMask to false." + "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> + "If you want a colorful logo you ust disable logoMask." }, %{ key: :logoMargin, @@ -1183,13 +1181,13 @@ config :pleroma, :config_description, [ %{ key: :stickers, type: :boolean, - description: "Enables/disables stickers." + description: "Enables stickers." }, %{ key: :enableEmojiPicker, label: "Emoji picker", type: :boolean, - description: "Enables/disables emoji picker." + description: "Enables emoji picker." } ] }, @@ -2086,7 +2084,7 @@ config :pleroma, :config_description, [ key: :unfurl_nsfw, label: "Unfurl NSFW", type: :boolean, - description: "If set to `true` NSFW attachments will be shown in previews" + description: "When enabled NSFW attachments will be shown in previews" } ] }, @@ -2358,7 +2356,7 @@ config :pleroma, :config_description, [ type: :boolean, description: "OAuth admin scope requirement toggle. " <> - "If `true`, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <> + "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <> "(client app must support admin scopes). If `false` and token doesn't have admin scope(s)," <> "`is_admin` user flag grants access to admin-specific actions." }, -- cgit v1.2.3 From ff9fd4ca895563178e3174fdc86d866508c5a9fa Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 11 Feb 2020 15:39:19 -0600 Subject: Fix the confusingly named and inverted logic of "no_attachment_links" The setting is now simply "attachment_links" and the boolean value does what you expect. A double negative is never possible and describing the functionality is no longer a philospher's worst nightmare. --- config/config.exs | 2 +- config/description.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 41c1ff637..ccc0c4e52 100644 --- a/config/config.exs +++ b/config/config.exs @@ -241,7 +241,7 @@ config :pleroma, :instance, mrf_transparency_exclusions: [], autofollowed_nicknames: [], max_pinned_statuses: 1, - no_attachment_links: true, + attachment_links: false, welcome_user_nickname: nil, welcome_message: nil, max_report_comment_size: 1000, diff --git a/config/description.exs b/config/description.exs index e5bac9b3f..6b9d09de9 100644 --- a/config/description.exs +++ b/config/description.exs @@ -796,10 +796,10 @@ config :pleroma, :config_description, [ ] }, %{ - key: :no_attachment_links, + key: :attachment_links, type: :boolean, description: - "Set to `true` to disable automatically adding attachment link text to statuses" + "Enable to automatically add attachment link text to statuses" }, %{ key: :welcome_message, -- cgit v1.2.3 From e4016f4dbdeb6e5c7cd1b130b90ac80a0466fa08 Mon Sep 17 00:00:00 2001 From: feld Date: Thu, 13 Feb 2020 13:59:47 +0000 Subject: Apply suggestion to config/description.exs --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 921316d07..75b1c8c10 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1167,7 +1167,7 @@ config :pleroma, :config_description, [ type: :boolean, description: "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> - "If you want a colorful logo you ust disable logoMask." + "If you want a colorful logo you just disable logoMask." }, %{ key: :logoMargin, -- cgit v1.2.3 From 4f5ee26f2da6e447a0e079c026846ceeb29e5045 Mon Sep 17 00:00:00 2001 From: feld Date: Thu, 13 Feb 2020 14:00:33 +0000 Subject: Update description.exs --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 75b1c8c10..909693319 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1167,7 +1167,7 @@ config :pleroma, :config_description, [ type: :boolean, description: "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> - "If you want a colorful logo you just disable logoMask." + "If you want a colorful logo you must disable logoMask." }, %{ key: :logoMargin, -- cgit v1.2.3 From 9b778dc54af2435128a23ce966214f06ad29dafe Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 13 Feb 2020 08:01:39 -0600 Subject: Formatting --- config/description.exs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 909693319..661acd716 100644 --- a/config/description.exs +++ b/config/description.exs @@ -637,12 +637,14 @@ config :pleroma, :config_description, [ %{ key: :registrations_open, type: :boolean, - description: "Enable registrations for anyone. Invitations require this setting to be disabled." + description: + "Enable registrations for anyone. Invitations require this setting to be disabled." }, %{ key: :invites_enabled, type: :boolean, - description: "Enable user invitations for admins (depends on `registrations_open` being disabled)." + description: + "Enable user invitations for admins (depends on `registrations_open` being disabled)." }, %{ key: :account_activation_required, @@ -798,8 +800,7 @@ config :pleroma, :config_description, [ %{ key: :no_attachment_links, type: :boolean, - description: - "Enable to disable automatically adding attachment link text to statuses" + description: "Enable to disable automatically adding attachment link text to statuses" }, %{ key: :welcome_message, -- cgit v1.2.3 From 571a475c7ec8f9bb6e3a252aa7c3c65a1621bed6 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 13 Feb 2020 08:02:33 -0600 Subject: Formatting --- config/description.exs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 6b9d09de9..4b727d673 100644 --- a/config/description.exs +++ b/config/description.exs @@ -798,8 +798,7 @@ config :pleroma, :config_description, [ %{ key: :attachment_links, type: :boolean, - description: - "Enable to automatically add attachment link text to statuses" + description: "Enable to automatically add attachment link text to statuses" }, %{ key: :welcome_message, -- cgit v1.2.3 From 9218f893d794c6184ea13b2d0b6e3a6e9492bc64 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 13 Feb 2020 11:31:02 -0600 Subject: More description cleanups --- config/description.exs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index efea7c137..bb6549274 100644 --- a/config/description.exs +++ b/config/description.exs @@ -534,7 +534,7 @@ config :pleroma, :config_description, [ %{ key: :description, type: :string, - description: "The instance's description, can be seen in nodeinfo and /api/v1/instance", + description: "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`", suggestions: [ "Very cool instance" ] @@ -770,7 +770,7 @@ config :pleroma, :config_description, [ key: :cleanup_attachments, type: :boolean, description: """ - "Enable to remove associated attachments when status is removed. + Enable to remove associated attachments when status is removed. This will not affect duplicates and attachments without status. Enabling this will increase load to database when deleting statuses on larger instances. """ @@ -838,7 +838,7 @@ config :pleroma, :config_description, [ %{ key: :healthcheck, type: :boolean, - description: "If enabled, system data will be shown on /api/pleroma/healthcheck" + description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`" }, %{ key: :remote_post_retention_days, @@ -1924,7 +1924,7 @@ config :pleroma, :config_description, [ key: :admin_token, type: :string, description: "Token", - suggestions: ["some_random_token"] + suggestions: ["We recommend a secure random string or UUID"] } ] }, @@ -2146,7 +2146,7 @@ config :pleroma, :config_description, [ key: :enabled, type: :boolean, description: - "If enabled, when a new user is federated with, fetch some of their latest posts" + "Fetch posts when a new user is federated with" }, %{ key: :pages, -- cgit v1.2.3 From 1c52cf933f380b1c8877af14ed496b2566a2e7ca Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 13 Feb 2020 11:45:58 -0600 Subject: More description cleanup work --- config/description.exs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index bb6549274..40e2a4415 100644 --- a/config/description.exs +++ b/config/description.exs @@ -101,7 +101,7 @@ config :pleroma, :config_description, [ %{ key: :versions, type: {:list, :atom}, - description: "List of TLS version to use", + description: "List of TLS versions to use", suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"] } ] @@ -2165,13 +2165,13 @@ config :pleroma, :config_description, [ %{ key: :class, type: [:string, false], - description: "Specify the class to be added to the generated link. `False` to clear", + description: "Specify the class to be added to the generated link. Disable to clear", suggestions: ["auto-linker", false] }, %{ key: :rel, type: [:string, false], - description: "Override the rel attribute. `False` to clear", + description: "Override the rel attribute. Disable to clear", suggestions: ["ugc", "noopener noreferrer", false] }, %{ @@ -2281,7 +2281,7 @@ config :pleroma, :config_description, [ key: :ssl, label: "SSL", type: :boolean, - description: "`True` to use SSL, usually implies the port 636" + description: "Enable to use SSL, usually implies the port 636" }, %{ key: :sslopts, @@ -2308,7 +2308,7 @@ config :pleroma, :config_description, [ key: :tls, label: "TLS", type: :boolean, - description: "`True` to start TLS, usually implies the port 389" + description: "Enable to use STARTTLS, usually implies the port 389" }, %{ key: :tlsopts, @@ -2358,7 +2358,7 @@ config :pleroma, :config_description, [ description: "OAuth admin scope requirement toggle. " <> "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <> - "(client app must support admin scopes). If `false` and token doesn't have admin scope(s)," <> + "(client app must support admin scopes). If disabled and token doesn't have admin scope(s)," <> "`is_admin` user flag grants access to admin-specific actions." }, %{ @@ -2517,7 +2517,7 @@ config :pleroma, :config_description, [ %{ key: :clean_expired_tokens, type: :boolean, - description: "Enable a background job to clean expired oauth tokens. Default: `false`." + description: "Enable a background job to clean expired oauth tokens. Default: disabled." } ] }, @@ -2577,7 +2577,7 @@ config :pleroma, :config_description, [ %{ key: :rum_enabled, type: :boolean, - description: "If RUM indexes should be used. Default: `false`" + description: "If RUM indexes should be used. Default: disabled" } ] }, @@ -2963,7 +2963,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enable/disable the plug. Default: `false`." + description: "Enable/disable the plug. Default: disabled." }, %{ key: :headers, @@ -3017,7 +3017,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables the rendering of static HTML. Defaults to `false`." + description: "Enables the rendering of static HTML. Default: disabled." } ] }, @@ -3093,7 +3093,7 @@ config :pleroma, :config_description, [ key: :configurable_from_database, type: :boolean, description: - "Allow transferring configuration to DB with the subsequent customization from Admin api. Defaults to `false`" + "Allow transferring configuration to DB with the subsequent customization from Admin api. Default: disabled" } ] } -- cgit v1.2.3 From aac7f30eb2883453c90208f40650c02d10e644fb Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 13 Feb 2020 11:49:19 -0600 Subject: Add missing Oban job for attachments_cleanup --- config/description.exs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 40e2a4415..9cfb4fb27 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1986,6 +1986,7 @@ config :pleroma, :config_description, [ "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)", suggestions: [ activity_expiration: 10, + attachments_cleanup: 5, background: 5, federator_incoming: 50, federator_outgoing: 50, @@ -2001,6 +2002,12 @@ config :pleroma, :config_description, [ description: "Activity expiration queue", suggestions: [10] }, + %{ + key: :attachments_cleanup, + type: :integer, + description: "Attachment deletion queue", + suggestions: [5] + }, %{ key: :background, type: :integer, -- cgit v1.2.3 From 21dc3e38120df94a12a670492d6c1cdc27ea3d14 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 13 Feb 2020 12:01:13 -0600 Subject: Even more description improvements --- config/description.exs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 9cfb4fb27..32b8611fe 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1296,14 +1296,14 @@ config :pleroma, :config_description, [ %{ key: :media_removal, type: {:list, :string}, - description: "List of instances to remove medias from", + description: "List of instances to strip media attachments from", suggestions: ["example.com", "*.example.com"] }, %{ key: :media_nsfw, label: "Media NSFW", type: {:list, :string}, - description: "List of instances to put medias as NSFW (sensitive) from", + description: "List of instances to tag all media as NSFW (sensitive) from", suggestions: ["example.com", "*.example.com"] }, %{ @@ -1422,21 +1422,21 @@ config :pleroma, :config_description, [ key: :reject, type: [:string, :regex], description: - "A list of patterns which result in message being rejected, each pattern can be a string or a regular expression.", + "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], 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.", + "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] }, %{ key: :replace, type: [{:tuple, :string, :string}, {:tuple, :regex, :string}], description: - "A list of tuples containing {pattern, replacement}, pattern can be a string or a regular expression.", + "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.", suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}] } ] @@ -1451,7 +1451,7 @@ config :pleroma, :config_description, [ %{ key: :actors, type: {:list, :string}, - description: "A list of actors, for which to drop any posts mentioning", + description: "A list of actors for which any post mentioning them will be dropped.", suggestions: ["actor1", "actor2"] } ] @@ -1855,9 +1855,8 @@ config :pleroma, :config_description, [ type: :string, description: "A mailto link for the administrative contact." <> - " It's best if this email is not a personal email address, but rather a group email so that if a person leaves an organization," <> - " is unavailable for an extended period, or otherwise can't respond, someone else on the list can.", - suggestions: ["Subject"] + " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.", + suggestions: ["mailto:moderators@pleroma.com"] }, %{ key: :public_key, @@ -2106,7 +2105,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables/disables RichMedia." + description: "Enables RichMedia parsing of URLs." }, %{ key: :ignore_hosts, @@ -2387,7 +2386,7 @@ config :pleroma, :config_description, [ key: :oauth_consumer_strategies, type: {:list, :string}, description: - "The list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <> + "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <> " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <> " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_).", suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"] -- cgit v1.2.3 From 0afff36cda445e442662e515b4bc7dac5e076a87 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 13 Feb 2020 12:09:11 -0600 Subject: Formatting got me again --- config/description.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 32b8611fe..0c0f4af3c 100644 --- a/config/description.exs +++ b/config/description.exs @@ -534,7 +534,8 @@ config :pleroma, :config_description, [ %{ key: :description, type: :string, - description: "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`", + description: + "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`", suggestions: [ "Very cool instance" ] @@ -2151,8 +2152,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: - "Fetch posts when a new user is federated with" + description: "Fetch posts when a new user is federated with" }, %{ key: :pages, -- cgit v1.2.3 From 269d592181bff8601f6545b85158ee1c222ff20d Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sat, 15 Feb 2020 20:41:38 +0300 Subject: [#1505] Restricted max thread distance for fetching replies on incoming federation (in addition to reply-to depth restriction). --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 5f7b6656c..50d058763 100644 --- a/config/description.exs +++ b/config/description.exs @@ -659,7 +659,7 @@ config :pleroma, :config_description, [ label: "Fed. incoming replies max depth", type: :integer, description: - "Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while" <> + "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <> " fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes.", suggestions: [ 100 -- cgit v1.2.3 From 0d14c3f41053f97d23fa9295745a817c08010969 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Thu, 20 Feb 2020 15:18:28 +0300 Subject: [#1505] Typo fix. --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 47b53d5af..c5a56b14d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -482,7 +482,7 @@ config :pleroma, Oban, scheduled_activities: 10, background: 5, remote_fetcher: 2, - attachments_cleanup: 5 + attachments_cleanup: 5, new_users_digest: 1 ], crontab: [ -- cgit v1.2.3 From b6bb73f43e31cc252dd3c64a85edd9650ebbf87c Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 20 Feb 2020 15:34:10 -0600 Subject: Apply database session parameter to improve GIN full text search --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 0eff26653..641b2c867 100644 --- a/config/config.exs +++ b/config/config.exs @@ -617,6 +617,8 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false +config :pleroma, Pleroma.Repo, parameters: [gin_fuzzy_search_limit: "500"] + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" -- cgit v1.2.3 From 9fe60c3b9c242621177cb8c182f4e23a2ada14e7 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 22 Feb 2020 09:29:05 -0600 Subject: Add missing invites_enabled and account_activation_required settings --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 641b2c867..42e2d06a8 100644 --- a/config/config.exs +++ b/config/config.exs @@ -219,6 +219,8 @@ config :pleroma, :instance, max_expiration: 365 * 24 * 60 * 60 }, registrations_open: true, + invites_enabled: false, + account_activation_required: false, federating: true, federation_incoming_replies_max_depth: 100, federation_reachability_timeout_days: 7, -- cgit v1.2.3 From f71aa644b1aedba32c83bad76bc512bfe52e6c75 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 25 Feb 2020 11:17:51 +0100 Subject: Add :unnamed option to default database configuration --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 9d1e29c0d..2b7a761ea 100644 --- a/config/config.exs +++ b/config/config.exs @@ -621,7 +621,9 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false -config :pleroma, Pleroma.Repo, parameters: [gin_fuzzy_search_limit: "500"] +config :pleroma, Pleroma.Repo, + parameters: [gin_fuzzy_search_limit: "500"], + prepare: :unnamed # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. -- cgit v1.2.3 From 2076c9f8c88b387fd3944f77bf05371261b6cebe Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Wed, 26 Feb 2020 19:50:07 +0300 Subject: unnecessary groups --- config/description.exs | 198 +------------------------------------------------ 1 file changed, 2 insertions(+), 196 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index f0d1077fd..aa8a8d790 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1615,160 +1615,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: Pleroma.Web.Endpoint, - type: :group, - description: "Phoenix endpoint configuration", - children: [ - %{ - key: :http, - label: "HTTP", - type: {:keyword, :integer, :tuple}, - description: "http protocol configuration", - suggestions: [ - port: 8080, - ip: {127, 0, 0, 1} - ], - children: [ - %{ - key: :dispatch, - type: {:list, :tuple}, - description: "dispatch settings", - suggestions: [ - {:_, - [ - {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, - {"/websocket", Phoenix.Endpoint.CowboyWebSocket, - {Phoenix.Transports.WebSocket, - {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}}, - {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} - ]} - # end copied from config.exs - ] - }, - %{ - key: :ip, - label: "IP", - type: :tuple, - description: "ip", - suggestions: [ - {0, 0, 0, 0} - ] - }, - %{ - key: :port, - type: :integer, - description: "port", - suggestions: [ - 2020 - ] - } - ] - }, - %{ - key: :url, - label: "URL", - type: {:keyword, :string, :integer}, - description: "configuration for generating urls", - suggestions: [ - host: "example.com", - port: 2020, - scheme: "https" - ], - children: [ - %{ - key: :host, - type: :string, - description: "Host", - suggestions: [ - "example.com" - ] - }, - %{ - key: :port, - type: :integer, - description: "port", - suggestions: [ - 2020 - ] - }, - %{ - key: :scheme, - type: :string, - description: "Scheme", - suggestions: [ - "https", - "https" - ] - } - ] - }, - %{ - key: :instrumenters, - type: {:list, :module}, - suggestions: [Pleroma.Web.Endpoint.Instrumenter] - }, - %{ - key: :protocol, - type: :string, - suggestions: ["https"] - }, - %{ - key: :secret_key_base, - type: :string, - suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"] - }, - %{ - key: :signing_salt, - type: :string, - suggestions: ["CqaoopA2"] - }, - %{ - key: :render_errors, - type: :keyword, - suggestions: [view: Pleroma.Web.ErrorView, accepts: ~w(json)], - children: [ - %{ - key: :view, - type: :module, - suggestions: [Pleroma.Web.ErrorView] - }, - %{ - key: :accepts, - type: {:list, :string}, - suggestions: ["json"] - } - ] - }, - %{ - key: :pubsub, - type: :keyword, - suggestions: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2], - children: [ - %{ - key: :name, - type: :module, - suggestions: [Pleroma.PubSub] - }, - %{ - key: :adapter, - type: :module, - suggestions: [Phoenix.PubSub.PG2] - } - ] - }, - %{ - key: :secure_cookie_flag, - type: :boolean - }, - %{ - key: :extra_cookie_attrs, - type: {:list, :string}, - suggestions: ["SameSite=Lax"] - } - ] - }, %{ group: :pleroma, key: :activitypub, @@ -2594,19 +2440,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :database, - type: :group, - description: "Database related settings", - children: [ - %{ - key: :rum_enabled, - type: :boolean, - description: "If RUM indexes should be used. Default: disabled" - } - ] - }, %{ group: :pleroma, key: :rate_limit, @@ -2770,20 +2603,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :prometheus, - key: Pleroma.Web.Endpoint.MetricsExporter, - type: :group, - description: "Prometheus settings", - children: [ - %{ - key: :path, - type: :string, - description: "API endpoint with metrics", - suggestions: ["/api/pleroma/app_metrics"] - } - ] - }, %{ group: :http_signatures, type: :group, @@ -3051,7 +2870,7 @@ config :pleroma, :config_description, [ group: :pleroma, key: :feed, type: :group, - description: "Configure feed rendering.", + description: "Configure feed rendering", children: [ %{ key: :post_title, @@ -3101,7 +2920,7 @@ config :pleroma, :config_description, [ group: :pleroma, key: :modules, type: :group, - description: "Custom Runtime Modules.", + description: "Custom Runtime Modules", children: [ %{ key: :runtime_dir, @@ -3109,18 +2928,5 @@ config :pleroma, :config_description, [ description: "A path to custom Elixir modules (such as MRF policies)." } ] - }, - %{ - group: :pleroma, - type: :group, - description: "Allow instance configuration from database.", - children: [ - %{ - key: :configurable_from_database, - type: :boolean, - description: - "Allow transferring configuration to DB with the subsequent customization from Admin api. Default: disabled" - } - ] } ] -- cgit v1.2.3 From 6f2efb1c450daa75d848dab8e3729ced81ed3904 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Thu, 27 Feb 2020 18:46:05 +0300 Subject: Runtime configurability of RateLimiter. Refactoring. Disabled default rate limits in tests. --- config/test.exs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 6bea09380..a17886265 100644 --- a/config/test.exs +++ b/config/test.exs @@ -74,11 +74,7 @@ config :pleroma, Pleroma.ScheduledActivity, total_user_limit: 3, enabled: false -config :pleroma, :rate_limit, - search: [{1000, 30}, {1000, 30}], - app_account_creation: {10_000, 5}, - password_reset: {1000, 30}, - ap_routes: nil +config :pleroma, :rate_limit, %{} config :pleroma, :http_security, report_uri: "https://endpoint.com" -- cgit v1.2.3 From fabcd82f4af4a432e404a936e5cccc0117445bfc Mon Sep 17 00:00:00 2001 From: Steven Fuchs Date: Fri, 28 Feb 2020 04:27:50 +0000 Subject: add confirm field to filtered params --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 9d1e29c0d..0dde1fc85 100644 --- a/config/config.exs +++ b/config/config.exs @@ -402,6 +402,8 @@ config :phoenix, :format_encoders, json: Jason config :phoenix, :json_library, Jason +config :phoenix, :filter_parameters, ["password", "confirm"] + config :pleroma, :gopher, enabled: false, ip: {0, 0, 0, 0}, -- cgit v1.2.3 From 04b03e476281be412d3505f514bd34d31e735214 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Sat, 29 Feb 2020 11:24:30 +0300 Subject: streamer group & Oban crontab child --- config/description.exs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index aa8a8d790..bcb69bc41 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1903,6 +1903,18 @@ config :pleroma, :config_description, [ suggestions: [50] } ] + }, + %{ + key: :crontab, + type: {:list, :tuple}, + description: "Settings for cron background jobs", + suggestions: [ + {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, + {"0 * * * *", Pleroma.Workers.Cron.StatsWorker}, + {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker}, + {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker}, + {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker} + ] } ] }, @@ -2928,5 +2940,25 @@ config :pleroma, :config_description, [ description: "A path to custom Elixir modules (such as MRF policies)." } ] + }, + %{ + group: :pleroma, + key: :streamer, + type: :group, + description: "Settings for notifications streamer", + children: [ + %{ + key: :workers, + type: :integer, + description: "Number of workers to send notifications.", + suggestions: [3] + }, + %{ + key: :overflow_workers, + type: :integer, + description: "Maximum number of workers created if pool is empty.", + suggestions: [2] + } + ] } ] -- cgit v1.2.3 From ffcebe7e22b4c5ccaf3ba63f3ed2885ac55a6b4d Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 28 Feb 2020 17:44:59 +0300 Subject: timeline controller: rate limit timelines to 3 requests per 500ms per timeline per ip/user --- config/config.exs | 1 + config/description.exs | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 0dde1fc85..9c4eb70a3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -599,6 +599,7 @@ config :http_signatures, config :pleroma, :rate_limit, authentication: {60_000, 15}, + timeline: {500, 3}, search: [{1000, 10}, {1000, 30}], app_account_creation: {1_800_000, 25}, relations_actions: {10_000, 10}, diff --git a/config/description.exs b/config/description.exs index bcb69bc41..9fdcfcd96 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2465,6 +2465,12 @@ config :pleroma, :config_description, [ description: "For the search requests (account & status search etc.)", suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, + %{ + key: :timeline, + type: [:tuple, {:list, :tuple}], + description: "For requests to timelines (each timeline has it's own limiter)", + suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] + }, %{ key: :app_account_creation, type: [:tuple, {:list, :tuple}], -- cgit v1.2.3