25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-16 17:15:55 +01:00

Fix some documentation syntax, add links to toplevel, modules and API

This commit is contained in:
Badlop 2024-12-05 16:42:46 +01:00
parent e589265921
commit f3c935d2e1
19 changed files with 116 additions and 99 deletions

View File

@ -297,7 +297,7 @@ get_commands_spec() ->
longdesc = "This command can be run from any running " longdesc = "This command can be run from any running "
"node of the cluster, even the node to be removed. " "node of the cluster, even the node to be removed. "
"In the removed node, this command works only when " "In the removed node, this command works only when "
"using ejabberdctl, not mod_http_api or other code that " "using ejabberdctl, not _`mod_http_api`_ or other code that "
"runs inside the same ejabberd node that will leave.", "runs inside the same ejabberd node that will leave.",
module = ?MODULE, function = leave_cluster, module = ?MODULE, function = leave_cluster,
args_desc = ["Nodename of the node to kick from the cluster"], args_desc = ["Nodename of the node to kick from the cluster"],

View File

@ -403,7 +403,7 @@ doc() ->
#{value => "true | false", #{value => "true | false",
note => "added in 23.10", note => "added in 23.10",
desc => desc =>
?T("Supplement check for user existence based on 'mod_last' data, for authentication " ?T("Supplement check for user existence based on _`mod_last`_ data, for authentication "
"methods that don't have a way to reliably tell if a user exists (like is the case for " "methods that don't have a way to reliably tell if a user exists (like is the case for "
"'jwt' and certificate based authentication). This helps with processing offline message " "'jwt' and certificate based authentication). This helps with processing offline message "
"for those users. The default value is 'true'.")}}, "for those users. The default value is 'true'.")}},
@ -440,8 +440,8 @@ doc() ->
desc => desc =>
?T("Full path to a file containing custom DH parameters " ?T("Full path to a file containing custom DH parameters "
"to use for c2s connections. " "to use for c2s connections. "
"Such a file could be created with the command \"openssl " "Such a file could be created with the command '\"openssl "
"dhparam -out dh.pem 2048\". If this option is not specified, " "dhparam -out dh.pem 2048\"'. If this option is not specified, "
"2048-bit MODP Group with 256-bit Prime Order Subgroup will be " "2048-bit MODP Group with 256-bit Prime Order Subgroup will be "
"used as defined in RFC5114 Section 2.3.")}}, "used as defined in RFC5114 Section 2.3.")}},
{c2s_protocol_options, {c2s_protocol_options,
@ -500,7 +500,7 @@ doc() ->
"If set to 'auto', it builds the URL using a 'request_handler' " "If set to 'auto', it builds the URL using a 'request_handler' "
"already enabled, with encryption if available. " "already enabled, with encryption if available. "
"If set to 'undefined', it builds the URL using " "If set to 'undefined', it builds the URL using "
"the deprecated _`captcha_host`_ + /captcha. " "the deprecated _`captcha_host`_ '+ /captcha'. "
"The default value is 'auto'.")}}, "The default value is 'auto'.")}},
{certfiles, {certfiles,
#{value => "[Path, ...]", #{value => "[Path, ...]",
@ -595,17 +595,25 @@ doc() ->
" transport.example.org:", " transport.example.org:",
" type: bare_source"]}, " type: bare_source"]},
[{type, [{type,
#{value => "random | source | destination | bare_source | bare_destination", #{value => ?T("Value"),
desc => desc =>
?T("How to deliver stanzas to connected components: " ?T("How to deliver stanzas to connected components. "
"'random' - an instance is chosen at random; " "The default value is 'random'. Possible values: ")},
"'destination' - an instance is chosen by the full JID of " [{'- random',
"the packet's 'to' attribute; " #{desc =>
"'source' - by the full JID of the packet's 'from' attribute; " ?T("an instance is chosen at random")}},
"'bare_destination' - by the bare JID (without resource) " {'- source',
"of the packet's 'to' attribute; " #{desc =>
"'bare_source' - by the bare JID (without resource) of the " ?T("by the full JID of the packet's 'from' attribute")}},
"packet's 'from' attribute is used. The default value is 'random'.")}}, {'- bare_destination',
#{desc =>
?T("by the bare JID (without resource) of the packet's 'to' attribute")}},
{'- bare_source',
#{desc =>
?T("by the bare JID (without resource) of the packet's 'from' attribute is used")}},
{'- destination',
#{desc =>
?T("an instance is chosen by the full JID of the packet's 'to' attribute")}}]},
{component_number, {component_number,
#{value => "2..1000", #{value => "2..1000",
desc => desc =>
@ -881,20 +889,20 @@ doc() ->
desc => desc =>
?T("The size (in bytes) of a log file to trigger rotation. " ?T("The size (in bytes) of a log file to trigger rotation. "
"If set to 'infinity', log rotation is disabled. " "If set to 'infinity', log rotation is disabled. "
"The default value is '10485760' (that is, 10 Mb).")}}, "The default value is 10 Mb expressed in bytes: '10485760'.")}},
{log_burst_limit_count, {log_burst_limit_count,
#{value => ?T("Number"), #{value => ?T("Number"),
note => "added in 22.10", note => "added in 22.10",
desc => desc =>
?T("The number of messages to accept in " ?T("The number of messages to accept in "
"`log_burst_limit_window_time` period before starting to " "`log_burst_limit_window_time` period before starting to "
"drop them. Default 500")}}, "drop them. Default `500`")}},
{log_burst_limit_window_time, {log_burst_limit_window_time,
#{value => ?T("Number"), #{value => ?T("Number"),
note => "added in 22.10", note => "added in 22.10",
desc => desc =>
?T("The time period to rate-limit log messages " ?T("The time period to rate-limit log messages "
"by. Defaults to 1 second.")}}, "by. Defaults to `1` second.")}},
{log_modules_fully, {log_modules_fully,
#{value => "[Module, ...]", #{value => "[Module, ...]",
note => "added in 23.01", note => "added in 23.01",
@ -1032,7 +1040,7 @@ doc() ->
?T("Trigger OOM killer when some of the running Erlang processes " ?T("Trigger OOM killer when some of the running Erlang processes "
"have messages queue above this 'Size'. Note that " "have messages queue above this 'Size'. Note that "
"such processes won't be killed if _`oom_killer`_ option is set " "such processes won't be killed if _`oom_killer`_ option is set "
"to 'false' or if 'oom_watermark' is not reached yet.")}}, "to 'false' or if _`oom_watermark`_ is not reached yet.")}},
{oom_watermark, {oom_watermark,
#{value => ?T("Percent"), #{value => ?T("Percent"),
desc => desc =>
@ -1055,7 +1063,7 @@ doc() ->
note => "added in 20.12", note => "added in 20.12",
desc => desc =>
?T("Specify the IPv4 address that will be used when establishing " ?T("Specify the IPv4 address that will be used when establishing "
"an outgoing S2S IPv4 connection, for example \"127.0.0.1\". " "an outgoing S2S IPv4 connection, for example '\"127.0.0.1\"'. "
"The default value is 'undefined'.")}}, "The default value is 'undefined'.")}},
{outgoing_s2s_ipv6_address, {outgoing_s2s_ipv6_address,
#{value => "Address", #{value => "Address",
@ -1063,7 +1071,7 @@ doc() ->
desc => desc =>
?T("Specify the IPv6 address that will be used when establishing " ?T("Specify the IPv6 address that will be used when establishing "
"an outgoing S2S IPv6 connection, for example " "an outgoing S2S IPv6 connection, for example "
"\"::FFFF:127.0.0.1\". The default value is 'undefined'.")}}, "'\"::FFFF:127.0.0.1\"'. The default value is 'undefined'.")}},
{outgoing_s2s_port, {outgoing_s2s_port,
#{value => "1..65535", #{value => "1..65535",
desc => desc =>
@ -1232,8 +1240,8 @@ doc() ->
desc => desc =>
?T("Full path to a file containing custom DH parameters " ?T("Full path to a file containing custom DH parameters "
"to use for s2s connections. " "to use for s2s connections. "
"Such a file could be created with the command \"openssl " "Such a file could be created with the command '\"openssl "
"dhparam -out dh.pem 2048\". If this option is not specified, " "dhparam -out dh.pem 2048\"'. If this option is not specified, "
"2048-bit MODP Group with 256-bit Prime Order Subgroup will be " "2048-bit MODP Group with 256-bit Prime Order Subgroup will be "
"used as defined in RFC5114 Section 2.3.")}}, "used as defined in RFC5114 Section 2.3.")}},
{s2s_protocol_options, {s2s_protocol_options,
@ -1396,7 +1404,7 @@ doc() ->
#{value => ?T("Size"), #{value => ?T("Size"),
desc => desc =>
?T("Number of connections to the SQL server that ejabberd will " ?T("Number of connections to the SQL server that ejabberd will "
"open for each virtual host. The default value is 10. WARNING: " "open for each virtual host. The default value is '10'. WARNING: "
"for SQLite this value is '1' by default and it's not recommended " "for SQLite this value is '1' by default and it's not recommended "
"to change it due to potential race conditions.")}}, "to change it due to potential race conditions.")}},
{sql_port, {sql_port,
@ -1490,7 +1498,7 @@ doc() ->
"possibly with masks. The default value is an empty list. " "possibly with masks. The default value is an empty list. "
"Using this option you can know the real IP " "Using this option you can know the real IP "
"of the request, for admin purpose, or security configuration " "of the request, for admin purpose, or security configuration "
"(for example using 'mod_fail2ban'). IMPORTANT: The proxy MUST " "(for example using _`mod_fail2ban`_). IMPORTANT: The proxy MUST "
"be configured to set the 'X-Forwarded-For' header if you " "be configured to set the 'X-Forwarded-For' header if you "
"enable this option as, otherwise, the client can set it " "enable this option as, otherwise, the client can set it "
"itself and as a result the IP value cannot be trusted for " "itself and as a result the IP value cannot be trusted for "
@ -1513,7 +1521,7 @@ doc() ->
"balancer can be chosen for a specific ejabberd implementation " "balancer can be chosen for a specific ejabberd implementation "
"while still providing a secure WebSocket connection. " "while still providing a secure WebSocket connection. "
"The default value is 'ignore'. An example value of the 'URL' is " "The default value is 'ignore'. An example value of the 'URL' is "
"\"https://test.example.org:8081\".")}}, "'\"https://test.example.org:8081\"'.")}},
{websocket_ping_interval, {websocket_ping_interval,
#{value => "timeout()", #{value => "timeout()",
desc => desc =>

View File

@ -274,9 +274,9 @@ get_commands_spec() ->
longdesc = "This command kicks the account sessions, " longdesc = "This command kicks the account sessions, "
"sets a random password, and stores ban details in the " "sets a random password, and stores ban details in the "
"account private storage. " "account private storage. "
"This command requires mod_private to be enabled. " "This command requires _`mod_private`_ to be enabled. "
"Check also _`get_ban_details`_ API " "Check also _`get_ban_details`_ API "
"and `_unban_account`_ API.", "and _`unban_account`_ API.",
module = ?MODULE, function = ban_account_v2, module = ?MODULE, function = ban_account_v2,
version = 2, version = 2,
note = "improved in 24.06", note = "improved in 24.06",
@ -2326,22 +2326,22 @@ mod_doc() ->
#{desc => #{desc =>
[?T("This module provides additional administrative commands."), "", [?T("This module provides additional administrative commands."), "",
?T("Details for some commands:"), "", ?T("Details for some commands:"), "",
?T("- 'ban_account':"), ?T("_`ban_account`_ API:"),
?T("This command kicks all the connected sessions of the account " ?T("This command kicks all the connected sessions of the account "
"from the server. It also changes their password to a randomly " "from the server. It also changes their password to a randomly "
"generated one, so they can't login anymore unless a server " "generated one, so they can't login anymore unless a server "
"administrator changes their password again. It is possible to " "administrator changes their password again. It is possible to "
"define the reason of the ban. The new password also includes " "define the reason of the ban. The new password also includes "
"the reason and the date and time of the ban. See an example below."), "the reason and the date and time of the ban. See an example below."), "",
?T("- 'pushroster': (and 'pushroster-all')"), ?T("_`push_roster`_ API (and _`push_roster_all`_ API):"),
?T("The roster file must be placed, if using Windows, on the " ?T("The roster file must be placed, if using Windows, on the "
"directory where you installed ejabberd: " "directory where you installed ejabberd: "
"`C:/Program Files/ejabberd` or similar. If you use other " "`C:/Program Files/ejabberd` or similar. If you use other "
"Operating System, place the file on the same directory where " "Operating System, place the file on the same directory where "
"the .beam files are installed. See below an example roster file."), "the .beam files are installed. See below an example roster file."), "",
?T("- 'srg_create':"), ?T("_`srg_create`_ API:"),
?T("If you want to put a group Name with blank spaces, use the " ?T("If you want to put a group Name with blank spaces, use the "
"characters \"\' and \'\" to define when the Name starts and " "characters '\"\'' and '\'\"' to define when the Name starts and "
"ends. See an example below.")], "ends. See an example below.")],
example => example =>
[{?T("With this configuration, vCards can only be modified with " [{?T("With this configuration, vCards can only be modified with "
@ -2356,14 +2356,14 @@ mod_doc() ->
" mod_admin_extra: {}", " mod_admin_extra: {}",
" mod_vcard:", " mod_vcard:",
" access_set: vcard_set"]}, " access_set: vcard_set"]},
{?T("Content of roster file for 'pushroster' command:"), {?T("Content of roster file for _`push_roster`_ API:"),
["[{<<\"bob\">>, <<\"example.org\">>, <<\"workers\">>, <<\"Bob\">>},", ["[{<<\"bob\">>, <<\"example.org\">>, <<\"workers\">>, <<\"Bob\">>},",
"{<<\"mart\">>, <<\"example.org\">>, <<\"workers\">>, <<\"Mart\">>},", "{<<\"mart\">>, <<\"example.org\">>, <<\"workers\">>, <<\"Mart\">>},",
"{<<\"Rich\">>, <<\"example.org\">>, <<\"bosses\">>, <<\"Rich\">>}]."]}, "{<<\"Rich\">>, <<\"example.org\">>, <<\"bosses\">>, <<\"Rich\">>}]."]},
{?T("With this call, the sessions of the local account which JID is " {?T("With this call, the sessions of the local account which JID is "
"boby@example.org will be kicked, and its password will be set " "'boby@example.org' will be kicked, and its password will be set "
"to something like " "to something like "
"'BANNED_ACCOUNT--20080425T21:45:07--2176635--Spammed_rooms'"), "'BANNED_ACCOUNT--20080425T21:45:07--2176635--Spammed_rooms'"),
["ejabberdctl vhost example.org ban_account boby \"Spammed rooms\""]}, ["ejabberdctl vhost example.org ban_account boby \"Spammed rooms\""]},
{?T("Call to srg_create using double-quotes and single-quotes:"), {?T("Call to _`srg_create`_ API using double-quotes and single-quotes:"),
["ejabberdctl srg_create g1 example.org \"\'Group number 1\'\" this_is_g1 g1"]}]}. ["ejabberdctl srg_create g1 example.org \"\'Group number 1\'\" this_is_g1 g1"]}]}.

View File

@ -269,5 +269,5 @@ mod_doc() ->
[?T("The module implements " [?T("The module implements "
"https://xmpp.org/extensions/xep-0191.html" "https://xmpp.org/extensions/xep-0191.html"
"[XEP-0191: Blocking Command]."), "", "[XEP-0191: Blocking Command]."), "",
?T("This module depends on 'mod_privacy' where " ?T("This module depends on _`mod_privacy`_ where "
"all the configuration is performed.")]}. "all the configuration is performed.")]}.

View File

@ -256,9 +256,8 @@ mod_doc() ->
?T("To use this module, in addition to adding it to the 'modules' " ?T("To use this module, in addition to adding it to the 'modules' "
"section, you must also enable it in 'listen' -> 'ejabberd_http' -> " "section, you must also enable it in 'listen' -> 'ejabberd_http' -> "
"_`listen-options.md#request_handlers|request_handlers`_."), "", "_`listen-options.md#request_handlers|request_handlers`_."), "",
?T("Make sure either 'mod_bosh' or 'ejabberd_http_ws' " ?T("Make sure either _`mod_bosh`_ or _`listen.md#ejabberd_http_ws|ejabberd_http_ws`_ "
"_`listen-options.md#request_handlers|request_handlers`_ " "are enabled in at least one 'request_handlers'."), "",
"are enabled."), "",
?T("When 'conversejs_css' and 'conversejs_script' are 'auto', " ?T("When 'conversejs_css' and 'conversejs_script' are 'auto', "
"by default they point to the public Converse client.") "by default they point to the public Converse client.")
], ],
@ -308,7 +307,7 @@ mod_doc() ->
#{value => ?T("auto | WebSocketURL"), #{value => ?T("auto | WebSocketURL"),
desc => desc =>
?T("A WebSocket URL to which Converse can connect to. " ?T("A WebSocket URL to which Converse can connect to. "
"The keyword '@HOST@' is replaced with the real virtual " "The '@HOST@' keyword is replaced with the real virtual "
"host name. " "host name. "
"If set to 'auto', it will build the URL of the first " "If set to 'auto', it will build the URL of the first "
"configured WebSocket request handler. " "configured WebSocket request handler. "

View File

@ -117,7 +117,7 @@ mod_doc() ->
[{?T("Make sure you do not delegate the same namespace to several " [{?T("Make sure you do not delegate the same namespace to several "
"services at the same time. As in the example provided later, " "services at the same time. As in the example provided later, "
"to have the 'sat-pubsub.example.org' component perform " "to have the 'sat-pubsub.example.org' component perform "
"correctly disable the 'mod_pubsub' module."), "correctly disable the _`mod_pubsub`_ module."),
["access_rules:", ["access_rules:",
" external_pubsub:", " external_pubsub:",
" allow: external_component", " allow: external_component",

View File

@ -214,7 +214,8 @@ mod_doc() ->
?T("To use this module, in addition to adding it to the 'modules' " ?T("To use this module, in addition to adding it to the 'modules' "
"section, you must also enable it in 'listen' -> 'ejabberd_http' -> " "section, you must also enable it in 'listen' -> 'ejabberd_http' -> "
"_`listen-options.md#request_handlers|request_handlers`_."), "", "_`listen-options.md#request_handlers|request_handlers`_."), "",
?T("Notice it only works if ejabberd_http has tls enabled.")], ?T("Notice it only works if _`listen.md#ejabberd_http|ejabberd_http`_ "
"has _`listen-options.md#tls|tls`_ enabled.")],
note => "added in 22.05", note => "added in 22.05",
example => example =>
["listen:", ["listen:",

View File

@ -561,10 +561,10 @@ mod_doc() ->
"section, you must also enable it in 'listen' -> 'ejabberd_http' -> " "section, you must also enable it in 'listen' -> 'ejabberd_http' -> "
"_`listen-options.md#request_handlers|request_handlers`_."), "", "_`listen-options.md#request_handlers|request_handlers`_."), "",
?T("To use a specific API version N, when defining the URL path " ?T("To use a specific API version N, when defining the URL path "
"in the request_handlers, add a 'vN'. " "in the request_handlers, add a vN. "
"For example: '/api/v2: mod_http_api'"), "", "For example: '/api/v2: mod_http_api'."), "",
?T("To run a command, send a POST request to the corresponding " ?T("To run a command, send a POST request to the corresponding "
"URL: 'http://localhost:5280/api/<command_name>'")], "URL: 'http://localhost:5280/api/COMMAND-NAME'")],
example => example =>
["listen:", ["listen:",
" -", " -",

View File

@ -243,14 +243,14 @@ mod_doc() ->
desc => desc =>
?T("This option defines the Jabber IDs of the service. " ?T("This option defines the Jabber IDs of the service. "
"If the 'hosts' option is not specified, the only Jabber ID will " "If the 'hosts' option is not specified, the only Jabber ID will "
"be the hostname of the virtual host with the prefix \"upload.\". " "be the hostname of the virtual host with the prefix '\"upload.\"'. "
"The keyword '@HOST@' is replaced with the real virtual host name.")}}, "The keyword '@HOST@' is replaced with the real virtual host name.")}},
{name, {name,
#{value => ?T("Name"), #{value => ?T("Name"),
desc => desc =>
?T("A name of the service in the Service Discovery. " ?T("A name of the service in the Service Discovery. "
"This will only be displayed by special XMPP clients. " "The default value is '\"HTTP File Upload\"'. "
"The default value is \"HTTP File Upload\".")}}, "Please note this will only be displayed by some XMPP clients.")}},
{access, {access,
#{value => ?T("AccessName"), #{value => ?T("AccessName"),
desc => desc =>
@ -270,7 +270,7 @@ mod_doc() ->
desc => desc =>
?T("This option defines the length of the random " ?T("This option defines the length of the random "
"string included in the GET and PUT URLs generated " "string included in the GET and PUT URLs generated "
"by 'mod_http_upload'. The minimum length is 8 characters, " "by 'mod_http_upload'. The minimum length is '8' characters, "
"but it is recommended to choose a larger value. " "but it is recommended to choose a larger value. "
"The default value is '40'.")}}, "The default value is '40'.")}},
{jid_in_url, {jid_in_url,
@ -293,8 +293,8 @@ mod_doc() ->
#{value => ?T("Permission"), #{value => ?T("Permission"),
desc => desc =>
?T("This option defines the permission bits of uploaded files. " ?T("This option defines the permission bits of uploaded files. "
"The bits are specified as an octal number (see the chmod(1) " "The bits are specified as an octal number (see the 'chmod(1)' "
"manual page) within double quotes. For example: \"0644\". " "manual page) within double quotes. For example: '\"0644\"'. "
"The default is undefined, which means no explicit permissions " "The default is undefined, which means no explicit permissions "
"will be set.")}}, "will be set.")}},
{dir_mode, {dir_mode,
@ -302,8 +302,8 @@ mod_doc() ->
desc => desc =>
?T("This option defines the permission bits of the 'docroot' " ?T("This option defines the permission bits of the 'docroot' "
"directory and any directories created during file uploads. " "directory and any directories created during file uploads. "
"The bits are specified as an octal number (see the chmod(1) " "The bits are specified as an octal number (see the 'chmod(1)' "
"manual page) within double quotes. For example: \"0755\". " "manual page) within double quotes. For example: '\"0755\"'. "
"The default is undefined, which means no explicit permissions " "The default is undefined, which means no explicit permissions "
"will be set.")}}, "will be set.")}},
{docroot, {docroot,
@ -311,26 +311,26 @@ mod_doc() ->
desc => desc =>
?T("Uploaded files are stored below the directory specified " ?T("Uploaded files are stored below the directory specified "
"(as an absolute path) with this option. The keyword " "(as an absolute path) with this option. The keyword "
"@HOME@ is replaced with the home directory of the user " "'@HOME@' is replaced with the home directory of the user "
"running ejabberd, and the keyword @HOST@ with the virtual " "running ejabberd, and the keyword '@HOST@' with the virtual "
"host name. The default value is \"@HOME@/upload\".")}}, "host name. The default value is '\"@HOME@/upload\"'.")}},
{put_url, {put_url,
#{value => ?T("URL"), #{value => ?T("URL"),
desc => desc =>
?T("This option specifies the initial part of the PUT URLs " ?T("This option specifies the initial part of the PUT URLs "
"used for file uploads. The keyword @HOST@ is replaced " "used for file uploads. The keyword '@HOST@' is replaced "
"with the virtual host name. NOTE: different virtual " "with the virtual host name. NOTE: different virtual "
"hosts cannot use the same PUT URL. " "hosts cannot use the same PUT URL. "
"The default value is \"https://@HOST@:5443/upload\".")}}, "The default value is '\"https://@HOST@:5443/upload\"'.")}},
{get_url, {get_url,
#{value => ?T("URL"), #{value => ?T("URL"),
desc => desc =>
?T("This option specifies the initial part of the GET URLs " ?T("This option specifies the initial part of the GET URLs "
"used for downloading the files. The default value is 'undefined'. " "used for downloading the files. The default value is 'undefined'. "
"When this option is 'undefined', this option is set " "When this option is 'undefined', this option is set "
"to the same value as 'put_url'. The keyword @HOST@ is " "to the same value as 'put_url'. The keyword '@HOST@' is "
"replaced with the virtual host name. NOTE: if GET requests " "replaced with the virtual host name. NOTE: if GET requests "
"are handled by 'mod_http_upload', the 'get_url' must match the " "are handled by this module, the 'get_url' must match the "
"'put_url'. Setting it to a different value only makes " "'put_url'. Setting it to a different value only makes "
"sense if an external web server or _`mod_http_fileserver`_ " "sense if an external web server or _`mod_http_fileserver`_ "
"is used to serve the uploaded files.")}}, "is used to serve the uploaded files.")}},
@ -349,9 +349,9 @@ mod_doc() ->
"Upload processing to a separate HTTP server. " "Upload processing to a separate HTTP server. "
"Both ejabberd and the HTTP server should share this " "Both ejabberd and the HTTP server should share this "
"secret and behave exactly as described at " "secret and behave exactly as described at "
"https://modules.prosody.im/mod_http_upload_external.html" "https://modules.prosody.im/mod_http_upload_external.html#implementation"
"[Prosody's mod_http_upload_external] in the " "[Prosody's mod_http_upload_external: Implementation]. "
"'Implementation' section. There is no default value.")}}, "There is no default value.")}},
{rm_on_unregister, {rm_on_unregister,
#{value => "true | false", #{value => "true | false",
desc => desc =>

View File

@ -96,7 +96,7 @@ mod_options(_) ->
mod_doc() -> mod_doc() ->
#{desc => #{desc =>
[?T("This module adds quota support for mod_http_upload."), "", [?T("This module adds quota support for mod_http_upload."), "",
?T("This module depends on 'mod_http_upload'.")], ?T("This module depends on _`mod_http_upload`_.")],
opts => opts =>
[{max_days, [{max_days,
#{value => ?T("Days"), #{value => ?T("Days"),
@ -126,10 +126,10 @@ mod_doc() ->
"user may upload. When this threshold is exceeded, " "user may upload. When this threshold is exceeded, "
"ejabberd deletes the oldest files uploaded by that " "ejabberd deletes the oldest files uploaded by that "
"user until their disk usage equals or falls below " "user until their disk usage equals or falls below "
"the specified soft quota (see 'access_soft_quota'). " "the specified soft quota (see also option 'access_soft_quota'). "
"The default value is 'hard_upload_quota'.")}}], "The default value is 'hard_upload_quota'.")}}],
example => example =>
[{?T("Please note that it's not necessary to specify the " [{?T("Notice it's not necessary to specify the "
"'access_hard_quota' and 'access_soft_quota' options in order " "'access_hard_quota' and 'access_soft_quota' options in order "
"to use the quota feature. You can stick to the default names " "to use the quota feature. You can stick to the default names "
"and just specify access rules such as those in this example:"), "and just specify access rules such as those in this example:"),

View File

@ -122,7 +122,7 @@ mod_doc() ->
desc => desc =>
?T("This option defines the Jabber IDs of the service. " ?T("This option defines the Jabber IDs of the service. "
"If the 'hosts' option is not specified, the only Jabber ID will " "If the 'hosts' option is not specified, the only Jabber ID will "
"be the hostname of the virtual host with the prefix \"mix.\". " "be the hostname of the virtual host with the prefix '\"mix.\"'. "
"The keyword '@HOST@' is replaced with the real virtual host name.")}}, "The keyword '@HOST@' is replaced with the real virtual host name.")}},
{name, {name,
#{value => ?T("Name"), #{value => ?T("Name"),

View File

@ -128,7 +128,7 @@ mod_doc() ->
"The module is needed if MIX compatible clients " "The module is needed if MIX compatible clients "
"on your server are going to join MIX channels " "on your server are going to join MIX channels "
"(either on your server or on any remote servers)."), "", "(either on your server or on any remote servers)."), "",
?T("NOTE: 'mod_mix' is not required for this module " ?T("NOTE: _`mod_mix`_ is not required for this module "
"to work, however, without 'mod_mix_pam' the MIX " "to work, however, without 'mod_mix_pam' the MIX "
"functionality of your local XMPP clients will be impaired.")], "functionality of your local XMPP clients will be impaired.")],
opts => opts =>

View File

@ -179,24 +179,35 @@ mod_doc() ->
example => example =>
["modules:", ["modules:",
" mod_mqtt_bridge:", " mod_mqtt_bridge:",
" replication_user: \"mqtt@xmpp.server.com\"",
" servers:", " servers:",
" \"mqtt://server.com\":", " \"mqtt://server.com\":",
" authentication:",
" certfile: \"/etc/ejabberd/mqtt_server.pem\"",
" publish:", " publish:",
" \"localA\": \"remoteA\" # local changes to 'localA' will be replicated on remote server as 'remoteA'", " \"localA\": \"remoteA\" # local changes to 'localA' will be replicated on remote server as 'remoteA'",
" \"topicB\": \"topicB\"", " \"topicB\": \"topicB\"",
" subscribe:", " subscribe:",
" \"remoteB\": \"localB\" # changes to 'remoteB' on remote server will be stored as 'localB' on local server", " \"remoteB\": \"localB\" # changes to 'remoteB' on remote server will be stored as 'localB' on local server"],
" authentication:",
" certfile: \"/etc/ejabberd/mqtt_server.pem\"",
" replication_user: \"mqtt@xmpp.server.com\""],
opts => opts =>
[{servers, [{servers,
#{value => "{ServerUrl: {publish: [TopicPairs], subscribe: [TopicPairs], authentication: [AuthInfo]}}", #{value => "{ServerUrl: {Key: Value}}",
desc => desc =>
?T("Declaration of data to share, must contain 'publish' or 'subscribe' or both, and 'authentication' " ?T("Declaration of data to share for each ServerUrl. "
"section with username/password field or certfile pointing to client certificate. " "Server URLs can use schemas: 'mqtt', 'mqtts' (mqtt with tls), 'mqtt5', "
"Accepted urls can use schema mqtt, mqtts (mqtt with tls), mqtt5, mqtt5s (both to trigger v5 protocol), " "'mqtt5s' (both to trigger v5 protocol), 'ws', 'wss', 'ws5', 'wss5'. "
"ws, wss, ws5, wss5. Certificate authentication can be only used with mqtts, mqtt5s, wss, wss5.")}}, "Keys must be:")},
[{authentication,
#{value => "{AuthKey: AuthValue}",
desc => ?T("List of authentication information, where AuthKey can be: "
"'username' and 'password' fields, or 'certfile' pointing to client certificate. "
"Certificate authentication can be used only with mqtts, mqtt5s, wss, wss5.")}},
{publish,
#{value => "{LocalTopic: RemoteTopic}",
desc => ?T("Either publish or subscribe must be set, or both.")}},
{subscribe,
#{value => "{RemoteTopic: LocalTopic}",
desc => ?T("Either publish or subscribe must be set, or both.")}}]},
{replication_user, {replication_user,
#{value => "JID", #{value => "JID",
desc => desc =>

View File

@ -1497,12 +1497,12 @@ mod_doc() ->
?T("A small history of the current discussion is sent to users " ?T("A small history of the current discussion is sent to users "
"when they enter the room. With this option you can define the " "when they enter the room. With this option you can define the "
"number of history messages to keep and send to users joining the room. " "number of history messages to keep and send to users joining the room. "
"The value is a non-negative integer. Setting the value to 0 disables " "The value is a non-negative integer. Setting the value to '0' disables "
"the history feature and, as a result, nothing is kept in memory. " "the history feature and, as a result, nothing is kept in memory. "
"The default value is 20. This value affects all rooms on the service. " "The default value is '20'. This value affects all rooms on the service. "
"NOTE: modern XMPP clients rely on Message Archives (XEP-0313), so feel " "NOTE: modern XMPP clients rely on Message Archives (XEP-0313), so feel "
"free to disable the history feature if you're only using modern clients " "free to disable the history feature if you're only using modern clients "
"and have 'mod_mam' module loaded.")}}, "and have _`mod_mam`_ module loaded.")}},
{host, #{desc => ?T("Deprecated. Use 'hosts' instead.")}}, {host, #{desc => ?T("Deprecated. Use 'hosts' instead.")}},
{hosts, {hosts,
#{value => ?T("[Host, ...]"), #{value => ?T("[Host, ...]"),
@ -1593,7 +1593,7 @@ mod_doc() ->
"When this option is not defined, message rate is not limited. " "When this option is not defined, message rate is not limited. "
"This feature can be used to protect a MUC service from occupant " "This feature can be used to protect a MUC service from occupant "
"abuses and limit number of messages that will be broadcasted by " "abuses and limit number of messages that will be broadcasted by "
"the service. A good value for this minimum message interval is 0.4 second. " "the service. A good value for this minimum message interval is '0.4' second. "
"If an occupant tries to send messages faster, an error is send back " "If an occupant tries to send messages faster, an error is send back "
"explaining that the message has been discarded and describing the " "explaining that the message has been discarded and describing the "
"reason why the message is not acceptable.")}}, "reason why the message is not acceptable.")}},
@ -1610,7 +1610,7 @@ mod_doc() ->
"the presence is cached by ejabberd and only the last presence " "the presence is cached by ejabberd and only the last presence "
"is broadcasted to all occupants in the room after expiration " "is broadcasted to all occupants in the room after expiration "
"of the interval delay. Intermediate presence packets are " "of the interval delay. Intermediate presence packets are "
"silently discarded. A good value for this option is 4 seconds.")}}, "silently discarded. A good value for this option is '4' seconds.")}},
{queue_type, {queue_type,
#{value => "ram | file", #{value => "ram | file",
desc => desc =>
@ -1843,7 +1843,7 @@ mod_doc() ->
?T("Maximum number of occupants in the room. " ?T("Maximum number of occupants in the room. "
"The default value is '200'.")}}, "The default value is '200'.")}},
{presence_broadcast, {presence_broadcast,
#{value => "[moderator | participant | visitor, ...]", #{value => "[Role]",
desc => desc =>
?T("List of roles for which presence is broadcasted. " ?T("List of roles for which presence is broadcasted. "
"The list can contain one or several of: 'moderator', " "The list can contain one or several of: 'moderator', "

View File

@ -2096,5 +2096,5 @@ mod_doc() ->
note => "added in 22.05", note => "added in 22.05",
desc => desc =>
?T("How many users can be subscribed to a room at once using " ?T("How many users can be subscribed to a room at once using "
"the 'subscribe_room_many' command. " "the _`subscribe_room_many`_ API. "
"The default value is '50'.")}}]}. "The default value is '50'.")}}]}.

View File

@ -1184,10 +1184,8 @@ mod_doc() ->
"again. Thus it is very similar to how email works. A user " "again. Thus it is very similar to how email works. A user "
"is considered offline if no session presence priority > 0 " "is considered offline if no session presence priority > 0 "
"are currently open."), "", "are currently open."), "",
?T("NOTE: 'ejabberdctl' has a command to " ?T("The _`delete_expired_messages`_ API allows to delete expired messages, "
"delete expired messages (see chapter " "and _`delete_old_messages`_ API deletes older ones.")],
"_`../guide/managing.md|Managing an ejabberd server`_ "
"in online documentation.")],
opts => opts =>
[{access_max_user_messages, [{access_max_user_messages,
#{value => ?T("AccessName"), #{value => ?T("AccessName"),
@ -1196,16 +1194,16 @@ mod_doc() ->
"enforced to limit the maximum number of offline " "enforced to limit the maximum number of offline "
"messages that a user can have (quota). When a user " "messages that a user can have (quota). When a user "
"has too many offline messages, any new messages that " "has too many offline messages, any new messages that "
"they receive are discarded, and a <resource-constraint/> " "they receive are discarded, and a '<resource-constraint/>' "
"error is returned to the sender. The default value is " "error is returned to the sender. The default value is "
"'max_user_offline_messages'.")}}, "'max_user_offline_messages'.")}},
{store_empty_body, {store_empty_body,
#{value => "true | false | unless_chat_state", #{value => "true | false | unless_chat_state",
desc => desc =>
?T("Whether or not to store messages that lack a <body/> " ?T("Whether or not to store messages that lack a '<body/>' "
"element. The default value is 'unless_chat_state', " "element. The default value is 'unless_chat_state', "
"which tells ejabberd to store messages even if they " "which tells ejabberd to store messages even if they "
"lack the <body/> element, unless they only contain a " "lack the '<body/>' element, unless they only contain a "
"chat state notification (as defined in " "chat state notification (as defined in "
"https://xmpp.org/extensions/xep-0085.html" "https://xmpp.org/extensions/xep-0085.html"
"[XEP-0085: Chat State Notifications].")}}, "[XEP-0085: Chat State Notifications].")}},
@ -1217,8 +1215,8 @@ mod_doc() ->
{use_mam_for_storage, {use_mam_for_storage,
#{value => "true | false", #{value => "true | false",
desc => desc =>
?T("This is an experimental option. Enabling this option, " ?T("This is an experimental option. By enabling the option, "
"'mod_offline' uses the 'mod_mam' archive table instead " "this module uses the 'archive' table from _`mod_mam`_ instead "
"of its own spool table to retrieve the messages received " "of its own spool table to retrieve the messages received "
"when the user was offline. This allows client " "when the user was offline. This allows client "
"developers to slowly drop XEP-0160 and rely on XEP-0313 " "developers to slowly drop XEP-0160 and rely on XEP-0313 "

View File

@ -895,8 +895,8 @@ mod_doc() ->
?T("NOTE: Nowadays modern XMPP clients rely on " ?T("NOTE: Nowadays modern XMPP clients rely on "
"https://xmpp.org/extensions/xep-0191.html" "https://xmpp.org/extensions/xep-0191.html"
"[XEP-0191: Blocking Command] which is implemented by " "[XEP-0191: Blocking Command] which is implemented by "
"'mod_blocking' module. However, you still need " "_`mod_blocking`_. However, you still need "
"'mod_privacy' loaded in order for _`mod_blocking`_ to work.")], "'mod_privacy' loaded in order for 'mod_blocking' to work.")],
opts => opts =>
[{db_type, [{db_type,
#{value => "mnesia | sql", #{value => "mnesia | sql",

View File

@ -135,7 +135,7 @@ mod_doc() ->
"[XEP-0048: Bookmarks])."), "", "[XEP-0048: Bookmarks])."), "",
?T("It also implements the bookmark conversion described in " ?T("It also implements the bookmark conversion described in "
"https://xmpp.org/extensions/xep-0402.html[XEP-0402: PEP Native Bookmarks]" "https://xmpp.org/extensions/xep-0402.html[XEP-0402: PEP Native Bookmarks]"
", see the command _`bookmarks_to_pep`_ API.")], ", see _`bookmarks_to_pep`_ API.")],
opts => opts =>
[{db_type, [{db_type,
#{value => "mnesia | sql", #{value => "mnesia | sql",

View File

@ -1343,7 +1343,7 @@ mod_doc() ->
"contacts are merged to the relevant users at retrieval time. " "contacts are merged to the relevant users at retrieval time. "
"The standard user rosters thus stay unmodified."), "", "The standard user rosters thus stay unmodified."), "",
?T("Shared roster groups can be edited via the Web Admin, " ?T("Shared roster groups can be edited via the Web Admin, "
"and some API commands called 'srg_*'. " "and some API commands called 'srg_', for example _`srg_add`_ API. "
"Each group has a unique name and those parameters:"), "", "Each group has a unique name and those parameters:"), "",
?T("- Label: Used in the rosters where this group is displayed."),"", ?T("- Label: Used in the rosters where this group is displayed."),"",
?T("- Description: of the group, which has no effect."), "", ?T("- Description: of the group, which has no effect."), "",