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

Annotate options and commands recently added

This commit is contained in:
Badlop 2022-05-04 15:18:57 +02:00
parent 32dee33070
commit 30b3c6c908
7 changed files with 16 additions and 2 deletions

View File

@ -322,6 +322,7 @@ get_commands_spec() ->
args = [{days, integer}], result = {res, rescode}}, args = [{days, integer}], result = {res, rescode}},
#ejabberd_commands{name = delete_old_messages_batch, tags = [purge], #ejabberd_commands{name = delete_old_messages_batch, tags = [purge],
desc = "Delete offline messages older than DAYS", desc = "Delete offline messages older than DAYS",
note = "added in 22.05",
module = ?MODULE, function = delete_old_messages_batch, module = ?MODULE, function = delete_old_messages_batch,
args_desc = ["Name of host where messages should be deleted", args_desc = ["Name of host where messages should be deleted",
"Days to keep messages", "Days to keep messages",
@ -334,6 +335,7 @@ get_commands_spec() ->
result_example = {ok, <<"Removal of 5000 messages in progress">>}}, result_example = {ok, <<"Removal of 5000 messages in progress">>}},
#ejabberd_commands{name = delete_old_messages_status, tags = [purge], #ejabberd_commands{name = delete_old_messages_status, tags = [purge],
desc = "Status of delete old offline messages operation", desc = "Status of delete old offline messages operation",
note = "added in 22.05",
module = ?MODULE, function = delete_old_messages_status, module = ?MODULE, function = delete_old_messages_status,
args_desc = ["Name of host where messages should be deleted"], args_desc = ["Name of host where messages should be deleted"],
args_example = [<<"localhost">>], args_example = [<<"localhost">>],
@ -343,6 +345,7 @@ get_commands_spec() ->
result_example = "Operation in progress, delete 5000 messages"}, result_example = "Operation in progress, delete 5000 messages"},
#ejabberd_commands{name = abort_delete_old_messages, tags = [purge], #ejabberd_commands{name = abort_delete_old_messages, tags = [purge],
desc = "Abort currently running delete old offline messages operation", desc = "Abort currently running delete old offline messages operation",
note = "added in 22.05",
module = ?MODULE, function = delete_old_messages_abort, module = ?MODULE, function = delete_old_messages_abort,
args_desc = ["Name of host where operation should be aborted"], args_desc = ["Name of host where operation should be aborted"],
args_example = [<<"localhost">>], args_example = [<<"localhost">>],

View File

@ -101,6 +101,7 @@ get_commands_spec() ->
}, },
#ejabberd_commands{name = oauth_revoke_token, tags = [oauth], #ejabberd_commands{name = oauth_revoke_token, tags = [oauth],
desc = "Revoke authorization for a token", desc = "Revoke authorization for a token",
note = "changed in 22.05",
module = ?MODULE, function = oauth_revoke_token, module = ?MODULE, function = oauth_revoke_token,
args = [{token, binary}], args = [{token, binary}],
policy = restricted, policy = restricted,

View File

@ -243,7 +243,8 @@ mod_doc() ->
#{desc => #{desc =>
[?T("This module serves a simple page for the " [?T("This module serves a simple page for the "
"https://conversejs.org/[Converse] XMPP web browser client."), "", "https://conversejs.org/[Converse] XMPP web browser client."), "",
?T("This module is available since ejabberd 21.12."), "", ?T("This module is available since ejabberd 21.12."),
?T("Several options were improved in ejabberd 22.05."), "",
?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' -> "
"http://../listen-options/#request-handlers[request_handlers]."), "", "http://../listen-options/#request-handlers[request_handlers]."), "",
@ -320,11 +321,13 @@ mod_doc() ->
"The default value is '@HOST@'.")}}, "The default value is '@HOST@'.")}},
{conversejs_resources, {conversejs_resources,
#{value => ?T("Path"), #{value => ?T("Path"),
note => "added in 22.05",
desc => desc =>
?T("Local path to the Converse files. " ?T("Local path to the Converse files. "
"If not set, the public Converse client will be used instead.")}}, "If not set, the public Converse client will be used instead.")}},
{conversejs_options, {conversejs_options,
#{value => "{Name: Value}", #{value => "{Name: Value}",
note => "added in 22.05",
desc => desc =>
?T("Specify additional options to be passed to Converse. " ?T("Specify additional options to be passed to Converse. "
"See https://conversejs.org/docs/html/configuration.html[Converse configuration]. " "See https://conversejs.org/docs/html/configuration.html[Converse configuration]. "

View File

@ -192,7 +192,7 @@ mod_doc() ->
[?T("This module serves small 'host-meta' files as described in " [?T("This module serves small 'host-meta' files as described in "
"https://xmpp.org/extensions/xep-0156.html[XEP-0156: Discovering " "https://xmpp.org/extensions/xep-0156.html[XEP-0156: Discovering "
"Alternative XMPP Connection Methods]."), "", "Alternative XMPP Connection Methods]."), "",
?T("This module is available since ejabberd 22.xx."), "", ?T("This module is available since ejabberd 22.05."), "",
?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' -> "
"http://../listen-options/#request-handlers[request_handlers]."), "", "http://../listen-options/#request-handlers[request_handlers]."), "",

View File

@ -1446,6 +1446,7 @@ get_commands_spec() ->
result = {res, rescode}}, result = {res, rescode}},
#ejabberd_commands{name = delete_old_mam_messages_batch, tags = [purge], #ejabberd_commands{name = delete_old_mam_messages_batch, tags = [purge],
desc = "Delete MAM messages older than DAYS", desc = "Delete MAM messages older than DAYS",
note = "added in 22.05",
longdesc = "Valid message TYPEs: " longdesc = "Valid message TYPEs: "
"\"chat\", \"groupchat\", \"all\".", "\"chat\", \"groupchat\", \"all\".",
module = ?MODULE, function = delete_old_messages_batch, module = ?MODULE, function = delete_old_messages_batch,
@ -1461,6 +1462,7 @@ get_commands_spec() ->
result_example = {ok, <<"Removal of 5000 messages in progress">>}}, result_example = {ok, <<"Removal of 5000 messages in progress">>}},
#ejabberd_commands{name = delete_old_mam_messages_status, tags = [purge], #ejabberd_commands{name = delete_old_mam_messages_status, tags = [purge],
desc = "Status of delete old MAM messages operation", desc = "Status of delete old MAM messages operation",
note = "added in 22.05",
module = ?MODULE, function = delete_old_messages_status, module = ?MODULE, function = delete_old_messages_status,
args_desc = ["Name of host where messages should be deleted"], args_desc = ["Name of host where messages should be deleted"],
args_example = [<<"localhost">>], args_example = [<<"localhost">>],
@ -1470,6 +1472,7 @@ get_commands_spec() ->
result_example = "Operation in progress, delete 5000 messages"}, result_example = "Operation in progress, delete 5000 messages"},
#ejabberd_commands{name = abort_delete_old_mam_messages, tags = [purge], #ejabberd_commands{name = abort_delete_old_mam_messages, tags = [purge],
desc = "Abort currently running delete old MAM messages operation", desc = "Abort currently running delete old MAM messages operation",
note = "added in 22.05",
module = ?MODULE, function = delete_old_messages_abort, module = ?MODULE, function = delete_old_messages_abort,
args_desc = ["Name of host where operation should be aborted"], args_desc = ["Name of host where operation should be aborted"],
args_example = [<<"localhost">>], args_example = [<<"localhost">>],

View File

@ -1634,11 +1634,13 @@ mod_doc() ->
" street: Elm Street"]}]}}, " street: Elm Street"]}]}},
{cleanup_affiliations_on_start, {cleanup_affiliations_on_start,
#{value => "true | false", #{value => "true | false",
note => "added in 22.05",
desc => desc =>
?T("Remove affiliations for non-existing local users on startup. " ?T("Remove affiliations for non-existing local users on startup. "
"The default value is 'false'.")}}, "The default value is 'false'.")}},
{default_room_options, {default_room_options,
#{value => ?T("Options"), #{value => ?T("Options"),
note => "improved in 22.05",
desc => desc =>
?T("This option allows to define the desired " ?T("This option allows to define the desired "
"default room options. Note that the creator of a room " "default room options. Note that the creator of a room "

View File

@ -337,6 +337,7 @@ get_commands_spec() ->
result = {nodes, {list, {node, string}}}}, result = {nodes, {list, {node, string}}}},
#ejabberd_commands{name = subscribe_room_many, tags = [muc_room], #ejabberd_commands{name = subscribe_room_many, tags = [muc_room],
desc = "Subscribe several users to a MUC conference", desc = "Subscribe several users to a MUC conference",
note = "added in 22.05",
longdesc = "This command accept up to 50 users at once (this is configurable with `subscribe_room_many_max_users` option)", longdesc = "This command accept up to 50 users at once (this is configurable with `subscribe_room_many_max_users` option)",
module = ?MODULE, function = subscribe_room_many, module = ?MODULE, function = subscribe_room_many,
args_desc = ["Users JIDs and nicks", args_desc = ["Users JIDs and nicks",
@ -1469,6 +1470,7 @@ mod_doc() ->
opts => opts =>
[{subscribe_room_many_max_users, [{subscribe_room_many_max_users,
#{value => ?T("Number"), #{value => ?T("Number"),
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' command. "