mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Add mam and offline tags to the related purge commands
This commit is contained in:
parent
512285e48d
commit
d9ddbe0212
@ -370,17 +370,17 @@ get_commands_spec() ->
|
||||
args = [{out, string}],
|
||||
result = {res, rescode}},
|
||||
|
||||
#ejabberd_commands{name = delete_expired_messages, tags = [purge],
|
||||
#ejabberd_commands{name = delete_expired_messages, tags = [offline, purge],
|
||||
desc = "Delete expired offline messages from database",
|
||||
module = ?MODULE, function = delete_expired_messages,
|
||||
args = [], result = {res, rescode}},
|
||||
#ejabberd_commands{name = delete_old_messages, tags = [purge],
|
||||
#ejabberd_commands{name = delete_old_messages, tags = [offline, purge],
|
||||
desc = "Delete offline messages older than DAYS",
|
||||
module = ?MODULE, function = delete_old_messages,
|
||||
args_desc = ["Number of days"],
|
||||
args_example = [31],
|
||||
args = [{days, integer}], result = {res, rescode}},
|
||||
#ejabberd_commands{name = delete_old_messages_batch, tags = [purge],
|
||||
#ejabberd_commands{name = delete_old_messages_batch, tags = [offline, purge],
|
||||
desc = "Delete offline messages older than DAYS",
|
||||
note = "added in 22.05",
|
||||
module = ?MODULE, function = delete_old_messages_batch,
|
||||
@ -393,7 +393,7 @@ get_commands_spec() ->
|
||||
result = {res, restuple},
|
||||
result_desc = "Result tuple",
|
||||
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 = [offline, purge],
|
||||
desc = "Status of delete old offline messages operation",
|
||||
note = "added in 22.05",
|
||||
module = ?MODULE, function = delete_old_messages_status,
|
||||
@ -403,7 +403,7 @@ get_commands_spec() ->
|
||||
result = {status, string},
|
||||
result_desc = "Status test",
|
||||
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 = [offline, purge],
|
||||
desc = "Abort currently running delete old offline messages operation",
|
||||
note = "added in 22.05",
|
||||
module = ?MODULE, function = delete_old_messages_abort,
|
||||
@ -528,7 +528,7 @@ get_commands_spec() ->
|
||||
module = ejabberd_doc, function = man,
|
||||
args = [], result = {res, restuple}},
|
||||
|
||||
#ejabberd_commands{name = webadmin_host_user_queue, tags = [internal],
|
||||
#ejabberd_commands{name = webadmin_host_user_queue, tags = [offline, internal],
|
||||
desc = "Generate WebAdmin offline queue HTML",
|
||||
module = mod_offline, function = webadmin_host_user_queue,
|
||||
args = [{user, binary}, {host, binary}, {query, any}, {lang, binary}],
|
||||
|
@ -1487,7 +1487,8 @@ get_jids(Js) ->
|
||||
[jid:tolower(jid:remove_resource(J)) || J <- Js].
|
||||
|
||||
get_commands_spec() ->
|
||||
[#ejabberd_commands{name = delete_old_mam_messages, tags = [purge],
|
||||
[
|
||||
#ejabberd_commands{name = delete_old_mam_messages, tags = [mam, purge],
|
||||
desc = "Delete MAM messages older than DAYS",
|
||||
longdesc = "Valid message TYPEs: "
|
||||
"`chat`, `groupchat`, `all`.",
|
||||
@ -1497,7 +1498,7 @@ get_commands_spec() ->
|
||||
args_example = [<<"all">>, 31],
|
||||
args = [{type, binary}, {days, integer}],
|
||||
result = {res, rescode}},
|
||||
#ejabberd_commands{name = delete_old_mam_messages_batch, tags = [purge],
|
||||
#ejabberd_commands{name = delete_old_mam_messages_batch, tags = [mam, purge],
|
||||
desc = "Delete MAM messages older than DAYS",
|
||||
note = "added in 22.05",
|
||||
longdesc = "Valid message TYPEs: "
|
||||
@ -1513,7 +1514,7 @@ get_commands_spec() ->
|
||||
result = {res, restuple},
|
||||
result_desc = "Result tuple",
|
||||
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 = [mam, purge],
|
||||
desc = "Status of delete old MAM messages operation",
|
||||
note = "added in 22.05",
|
||||
module = ?MODULE, function = delete_old_messages_status,
|
||||
@ -1523,7 +1524,7 @@ get_commands_spec() ->
|
||||
result = {status, string},
|
||||
result_desc = "Status test",
|
||||
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 = [mam, purge],
|
||||
desc = "Abort currently running delete old MAM messages operation",
|
||||
note = "added in 22.05",
|
||||
module = ?MODULE, function = delete_old_messages_abort,
|
||||
|
Loading…
Reference in New Issue
Block a user