diff options
Diffstat (limited to 'src/mod_last.erl')
-rw-r--r-- | src/mod_last.erl | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/mod_last.erl b/src/mod_last.erl index 28b66be08..6a37a9e1c 100644 --- a/src/mod_last.erl +++ b/src/mod_last.erl @@ -5,7 +5,7 @@ %%% Created : 24 Oct 2003 by Alexey Shchepin <alexey@process-one.net> %%% %%% -%%% ejabberd, Copyright (C) 2002-2019 ProcessOne +%%% ejabberd, Copyright (C) 2002-2020 ProcessOne %%% %%% This program is free software; you can redistribute it and/or %%% modify it under the terms of the GNU General Public License as @@ -34,7 +34,7 @@ -export([start/2, stop/1, reload/3, process_local_iq/1, export/1, process_sm_iq/1, on_presence_update/4, import_info/0, import/5, import_start/2, store_last_info/4, get_last_info/2, - remove_user/2, mod_opt_type/1, mod_options/1, + remove_user/2, mod_opt_type/1, mod_options/1, mod_doc/0, register_user/2, depends/2, privacy_check_packet/4]). -include("logger.hrl"). @@ -331,3 +331,33 @@ mod_options(Host) -> {cache_size, ejabberd_option:cache_size(Host)}, {cache_missed, ejabberd_option:cache_missed(Host)}, {cache_life_time, ejabberd_option:cache_life_time(Host)}]. + +mod_doc() -> + #{desc => + ?T("This module adds support for " + "https://xmpp.org/extensions/xep-0012.html" + "[XEP-0012: Last Activity]. It can be used " + "to discover when a disconnected user last accessed " + "the server, to know when a connected user was last " + "active on the server, or to query the uptime of the ejabberd server."), + opts => + [{db_type, + #{value => "mnesia | sql", + desc => + ?T("Same as top-level 'default_db' option, but applied to this module only.")}}, + {use_cache, + #{value => "true | false", + desc => + ?T("Same as top-level 'use_cache' option, but applied to this module only.")}}, + {cache_size, + #{value => "pos_integer() | infinity", + desc => + ?T("Same as top-level 'cache_size' option, but applied to this module only.")}}, + {cache_missed, + #{value => "true | false", + desc => + ?T("Same as top-level 'cache_missed' option, but applied to this module only.")}}, + {cache_life_time, + #{value => "timeout()", + desc => + ?T("Same as top-level 'cache_life_time' option, but applied to this module only.")}}]}. |