notification_view.ex: Make sure `account` isn’t empty
[akkoma] / config / description.exs
index 959d839bc497849021b1029db756ae0f8c764e4a..4547ea36839e5d04ff6a017f209ecba47adce4cd 100644 (file)
@@ -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."
       }
     ]
   },
@@ -857,7 +863,6 @@ config :pleroma, :config_description, [
       %{
         key: :metadata,
         type: {:list, :atom},
-        description: "",
         suggestions: [[:request_id]]
       }
     ]
@@ -883,7 +888,6 @@ config :pleroma, :config_description, [
       %{
         key: :metadata,
         type: {:list, :atom},
-        description: "",
         suggestions: [[:request_id]]
       }
     ]
@@ -1177,7 +1181,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :mrf_rejectnonpublic,
     type: :group,
-    description: "",
     children: [
       %{
         key: :allow_followersonly,
@@ -1444,43 +1447,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 +1484,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 +1833,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :rich_media,
     type: :group,
-    description: "",
     children: [
       %{
         key: :enabled,
@@ -1916,7 +1906,7 @@ config :pleroma, :config_description, [
         key: :rel,
         type: [:string, false],
         description: "override the rel attribute. false to clear",
-        suggestions: ["noopener noreferrer", false]
+        suggestions: ["ugc", "noopener noreferrer", false]
       },
       %{
         key: :new_window,
@@ -1995,7 +1985,6 @@ config :pleroma, :config_description, [
       %{
         key: Pleroma.Web.Auth.Authenticator,
         type: :module,
-        description: "",
         suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
       }
     ]
@@ -2150,7 +2139,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]
       },
@@ -2172,37 +2161,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 +2228,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :emoji,
     type: :group,
-    description: "",
     children: [
       %{
         key: :shortcode_globs,
@@ -2280,6 +2262,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]
       }
     ]
   },
@@ -2387,7 +2377,6 @@ config :pleroma, :config_description, [
       %{
         key: :types,
         type: :map,
-        description: "",
         suggestions: [
           %{
             "application/xml" => ["xml"],
@@ -2401,31 +2390,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 +2437,7 @@ config :pleroma, :config_description, [
     children: [
       %{
         key: :enabled,
-        type: :boolean,
-        description: ""
+        type: :boolean
       }
     ]
   },
@@ -2462,7 +2445,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :suggestions,
     type: :group,
-    description: "",
     children: [
       %{
         key: :enabled,
@@ -2492,7 +2474,6 @@ config :pleroma, :config_description, [
       %{
         key: :web,
         type: :string,
-        description: "",
         suggestions: ["https://vinayaka.distsn.org"]
       }
     ]
@@ -2519,7 +2500,6 @@ config :pleroma, :config_description, [
       %{
         key: :adapter,
         type: :module,
-        description: "",
         suggestions: [Pleroma.Signature]
       }
     ]
@@ -2528,18 +2508,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 +2530,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 +2556,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 +2584,10 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :user,
     type: :group,
-    description: "",
     children: [
       %{
         key: :deny_follow_blocked,
-        type: :boolean,
-        description: ""
+        type: :boolean
       }
     ]
   },
@@ -2629,12 +2595,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 +2607,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 +2651,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,17 +2678,51 @@ config :pleroma, :config_description, [
       },
       %{
         key: :credentials,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :headers,
         type: {:list, :string},
-        description: "",
         suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]]
       }
     ]
   },
+  %{
+    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,