summaryrefslogtreecommitdiff
path: root/src/mod_muc_opt.erl
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2019-07-16 13:57:48 +0200
committerPaweł Chmielowski <pchmielowski@process-one.net>2019-07-16 15:09:58 +0200
commit6b3d0d154e96a42ba1f18ad3a445d9f6e9aaccfa (patch)
tree941d767c01fa655f7c09ba98689b8e08bf6bc81c /src/mod_muc_opt.erl
parentBump xmpp version and fix revealed bugs (diff)
Add code for hibernating inactive muc_room processes
Diffstat (limited to 'src/mod_muc_opt.erl')
-rw-r--r--src/mod_muc_opt.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mod_muc_opt.erl b/src/mod_muc_opt.erl
index df6d5e78..6beca88c 100644
--- a/src/mod_muc_opt.erl
+++ b/src/mod_muc_opt.erl
@@ -11,6 +11,7 @@
-export([access_register/1]).
-export([db_type/1]).
-export([default_room_options/1]).
+-export([hibernation_timeout/1]).
-export([history_size/1]).
-export([host/1]).
-export([hosts/1]).
@@ -81,6 +82,12 @@ default_room_options(Opts) when is_map(Opts) ->
default_room_options(Host) ->
gen_mod:get_module_opt(Host, mod_muc, default_room_options).
+-spec hibernation_timeout(gen_mod:opts() | global | binary()) -> 'infinity' | non_neg_integer().
+hibernation_timeout(Opts) when is_map(Opts) ->
+ gen_mod:get_opt(hibernation_timeout, Opts);
+hibernation_timeout(Host) ->
+ gen_mod:get_module_opt(Host, mod_muc, hibernation_timeout).
+
-spec history_size(gen_mod:opts() | global | binary()) -> non_neg_integer().
history_size(Opts) when is_map(Opts) ->
gen_mod:get_opt(history_size, Opts);