From: Evgeniy Khramtsov Date: Wed, 3 Jun 2015 12:18:09 +0000 (+0300) Subject: Add missing options of mod_muc to validator X-Git-Tag: 15.06~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83faff37e555cf2bdf8f57c1c07e8c2d9d6ea9e6;p=ejabberd Add missing options of mod_muc to validator --- diff --git a/src/mod_muc.erl b/src/mod_muc.erl index 81d232be7..6226ca3b2 100644 --- a/src/mod_muc.erl +++ b/src/mod_muc.erl @@ -1358,14 +1358,41 @@ mod_opt_type(default_room_options) -> mod_opt_type(history_size) -> fun (I) when is_integer(I), I >= 0 -> I end; mod_opt_type(host) -> fun iolist_to_binary/1; +mod_opt_type(max_room_desc) -> + fun (infinity) -> infinity; + (I) when is_integer(I), I > 0 -> I + end; mod_opt_type(max_room_id) -> fun (infinity) -> infinity; (I) when is_integer(I), I > 0 -> I end; -mod_opt_type(persist_history) -> fun (X) -> X end; +mod_opt_type(max_room_name) -> + fun (infinity) -> infinity; + (I) when is_integer(I), I > 0 -> I + end; +mod_opt_type(max_user_conferences) -> + fun (I) when is_integer(I), I > 0 -> I end; +mod_opt_type(max_users) -> + fun (I) when is_integer(I), I > 0 -> I end; +mod_opt_type(max_users_admin_threshold) -> + fun (I) when is_integer(I), I > 0 -> I end; +mod_opt_type(max_users_presence) -> + fun (MUP) when is_integer(MUP) -> MUP end; +mod_opt_type(min_message_interval) -> + fun (MMI) when is_number(MMI) -> MMI end; +mod_opt_type(min_presence_interval) -> + fun (I) when is_number(I), I >= 0 -> I end; mod_opt_type(room_shaper) -> fun (A) when is_atom(A) -> A end; +mod_opt_type(user_message_shaper) -> + fun (A) when is_atom(A) -> A end; +mod_opt_type(user_presence_shaper) -> + fun (A) when is_atom(A) -> A end; mod_opt_type(_) -> [access, access_admin, access_create, access_persistent, db_type, default_room_options, history_size, host, - max_room_id, persist_history, room_shaper]. + max_room_desc, max_room_id, max_room_name, + max_user_conferences, max_users, + max_users_admin_threshold, max_users_presence, + min_message_interval, min_presence_interval, + room_shaper, user_message_shaper, user_presence_shaper].