X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=config%2Fdescription.exs;h=5dc8dc36466c187f7815c8c0f5be95bd376fbc30;hb=38245f13367cdc2df29ff2a499418e526b654fb5;hp=537b9d9964acc57910b1e785e096a798f1452c69;hpb=171cefd88972c6ec1f37a2e014a9a484ae91ab9a;p=akkoma diff --git a/config/description.exs b/config/description.exs index 537b9d996..5dc8dc364 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1,5 +1,5 @@ use Mix.Config -alias Pleroma.Docs.Formatter +alias Pleroma.Docs.Generator websocket_config = [ path: "/websocket", @@ -24,7 +24,7 @@ config :pleroma, :config_description, [ type: :module, description: "Module which will be used for uploads", suggestions: [ - Formatter.uploaders_list() + Generator.uploaders_list() ] }, %{ @@ -32,17 +32,14 @@ config :pleroma, :config_description, [ type: {:list, :module}, description: "List of filter modules for uploads", suggestions: [ - Formatter.filters_list() + Generator.filters_list() ] }, %{ key: :link_name, type: :boolean, - description: "If enabled Pleroma will add name parameter to the url off the upload", - suggestions: [ - true, - false - ] + 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`" }, %{ key: :base_url, @@ -55,17 +52,13 @@ config :pleroma, :config_description, [ %{ key: :proxy_remote, type: :boolean, - description: "If enabled, Pleroma will proxy media requests instead of redirecting to it", - suggestions: [ - true, - false - ] + description: + "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected." }, %{ key: :proxy_opts, type: :keyword, - description: "Proxy options, see `Pleroma.ReverseProxy` documentation", - suggestions: ["somehow created link to Pleroma.ReverseProxy options"] + description: "Proxy options, see `Pleroma.ReverseProxy` documentation" } ] }, @@ -93,7 +86,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :bucket, - type: :strings, + type: :string, description: "S3 bucket", suggestions: [ "bucket" @@ -116,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." } ] }, @@ -189,11 +181,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}, @@ -220,8 +208,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}, @@ -255,8 +242,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}, @@ -283,8 +269,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}, @@ -374,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" } ] }, @@ -552,38 +534,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, @@ -617,11 +583,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, @@ -629,7 +591,7 @@ config :pleroma, :config_description, [ description: "A list of MRF policies enabled", suggestions: [ Pleroma.Web.ActivityPub.MRF.NoOpPolicy, - Formatter.mrf_list() + Generator.mrf_list() ] }, %{ @@ -637,11 +599,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, @@ -657,11 +615,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, @@ -688,11 +642,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, @@ -708,11 +658,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, @@ -740,11 +686,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, @@ -779,20 +721,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, @@ -822,11 +756,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, @@ -843,11 +773,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, @@ -877,19 +803,15 @@ 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 ] }, %{ 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" } ] }, @@ -935,7 +857,6 @@ config :pleroma, :config_description, [ %{ key: :metadata, type: {:list, :atom}, - description: "", suggestions: [[:request_id]] } ] @@ -961,7 +882,6 @@ config :pleroma, :config_description, [ %{ key: :metadata, type: {:list, :atom}, - description: "", suggestions: [[:request_id]] } ] @@ -1068,48 +988,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, @@ -1123,8 +1035,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" } ] }, @@ -1141,8 +1052,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" } ] } @@ -1265,19 +1175,16 @@ config :pleroma, :config_description, [ group: :pleroma, key: :mrf_rejectnonpublic, type: :group, - description: "", children: [ %{ 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" } ] }, @@ -1392,8 +1299,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, @@ -1425,8 +1331,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables the gopher interface", - suggestions: [true, false] + description: "Enables the gopher interface" }, %{ key: :ip, @@ -1536,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"] } ] @@ -1580,33 +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: "", - suggestions: [true, false] + type: :boolean }, %{ key: :extra_cookie_attrs, type: {:list, :string}, - description: "", suggestions: ["SameSite=Lax"] } ] @@ -1620,20 +1512,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, @@ -1652,14 +1541,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, @@ -1726,8 +1613,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, @@ -1777,87 +1663,138 @@ 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)" + }, + %{ + 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" + } + ] + }, + %{ + 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" }, %{ - 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 + ] + ] } ] }, @@ -1882,11 +1819,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" } ] }, @@ -1894,14 +1827,12 @@ config :pleroma, :config_description, [ group: :pleroma, key: :rich_media, type: :group, - description: "", children: [ %{ 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, @@ -1920,7 +1851,7 @@ config :pleroma, :config_description, [ type: {:list, :module}, description: "list of Rich Media parsers", suggestions: [ - Formatter.richmedia_parsers() + Generator.richmedia_parsers() ] }, %{ @@ -1943,8 +1874,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, @@ -1975,14 +1905,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, @@ -1994,14 +1922,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.)" } ] }, @@ -2028,8 +1954,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" } ] }, @@ -2042,8 +1967,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" } ] }, @@ -2055,7 +1979,6 @@ config :pleroma, :config_description, [ %{ key: Pleroma.Web.Auth.Authenticator, type: :module, - description: "", suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator] } ] @@ -2073,8 +1996,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "enables LDAP authentication", - suggestions: [true, false] + description: "enables LDAP authentication" }, %{ key: :host, @@ -2091,26 +2013,22 @@ 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, type: :keyword, - description: "additional SSL options", - suggestions: [] + description: "additional SSL options" }, %{ 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, type: :keyword, - description: "additional TLS options", - suggestions: [] + description: "additional TLS options" }, %{ key: :base, @@ -2182,8 +2100,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, @@ -2216,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] }, @@ -2238,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"] } ] @@ -2291,14 +2202,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, @@ -2313,7 +2222,6 @@ config :pleroma, :config_description, [ group: :pleroma, key: :emoji, type: :group, - description: "", children: [ %{ key: :shortcode_globs, @@ -2348,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] } ] }, @@ -2360,8 +2276,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" } ] }, @@ -2420,8 +2335,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables ssh", - suggestions: [true, false] + description: "Enables ssh" }, %{ key: :priv_dir, @@ -2457,7 +2371,6 @@ config :pleroma, :config_description, [ %{ key: :types, type: :map, - description: "", suggestions: [ %{ "application/xml" => ["xml"], @@ -2471,31 +2384,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"]] } ] @@ -2523,9 +2431,7 @@ config :pleroma, :config_description, [ children: [ %{ key: :enabled, - type: :boolean, - description: "", - suggestions: [true, false] + type: :boolean } ] }, @@ -2533,13 +2439,11 @@ config :pleroma, :config_description, [ group: :pleroma, key: :suggestions, type: :group, - description: "", children: [ %{ key: :enabled, type: :boolean, - description: "Enables suggestions", - suggestions: [] + description: "Enables suggestions" }, %{ key: :third_party_engine, @@ -2564,7 +2468,6 @@ config :pleroma, :config_description, [ %{ key: :web, type: :string, - description: "", suggestions: ["https://vinayaka.distsn.org"] } ] @@ -2591,7 +2494,6 @@ config :pleroma, :config_description, [ %{ key: :adapter, type: :module, - description: "", suggestions: [Pleroma.Signature] } ] @@ -2600,18 +2502,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"] } ] @@ -2625,19 +2524,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: "", - suggestions: [true, false] + type: :boolean }, %{ key: :adapter, type: :keyword, - description: "", suggestions: [ [ ssl_options: [ @@ -2655,36 +2550,26 @@ config :pleroma, :config_description, [ group: :pleroma, key: :markup, type: :group, - description: "", children: [ %{ key: :allow_inline_images, - type: :boolean, - description: "", - suggestions: [true, false] + type: :boolean }, %{ key: :allow_headings, - type: :boolean, - description: "", - suggestions: [true, false] + type: :boolean }, %{ key: :allow_tables, - type: :boolean, - description: "", - suggestions: [true, false] + type: :boolean }, %{ key: :allow_fonts, - type: :boolean, - description: "", - suggestions: [true, false] + type: :boolean }, %{ key: :scrub_policy, type: {:list, :module}, - description: "", suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]] } ] @@ -2693,13 +2578,10 @@ config :pleroma, :config_description, [ group: :pleroma, key: :user, type: :group, - description: "", children: [ %{ key: :deny_follow_blocked, - type: :boolean, - description: "", - suggestions: [true, false] + type: :boolean } ] }, @@ -2707,12 +2589,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] } ] @@ -2721,12 +2601,10 @@ config :pleroma, :config_description, [ group: :pleroma, key: Pleroma.User, type: :group, - description: "", children: [ %{ key: :restricted_nicknames, type: {:list, :string}, - description: "", suggestions: [ [ ".well-known", @@ -2767,24 +2645,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", @@ -2798,16 +2672,36 @@ config :pleroma, :config_description, [ }, %{ key: :credentials, - type: :boolean, - description: "", - suggestions: [true, false] + type: :boolean }, %{ key: :headers, type: {:list, :string}, - description: "", suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]] } ] + }, + %{ + group: :pleroma, + key: :web_cache_ttl, + type: :group, + description: + "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.", + children: [ + %{ + key: :activity_pub, + type: :integer, + description: + "activity pub routes (except question activities). Defaults to `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).", + suggestions: [30_000] + } + ] } ]