From 06dbe80c65fa923bacd88785440ca40f226b909c Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 27 Jun 2018 11:38:17 +0200 Subject: [PATCH] Add mod_options callback function (#250) --- mod_rest/src/mod_rest.erl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mod_rest/src/mod_rest.erl b/mod_rest/src/mod_rest.erl index 1cfab16..d41915b 100644 --- a/mod_rest/src/mod_rest.erl +++ b/mod_rest/src/mod_rest.erl @@ -31,7 +31,7 @@ depends/2, split_line/1, process/2, - mod_opt_type/1]). + mod_opt_type/1, mod_options/1]). -include("ejabberd.hrl"). -include("logger.hrl"). @@ -183,6 +183,10 @@ mod_opt_type(allowed_destinations) -> mod_opt_type(allowed_stanza_types) -> fun (all) -> all; (A) when is_list(A) -> A end; mod_opt_type(access_commands) -> - fun (A) when is_list(A) -> A end; -mod_opt_type(_) -> - [allowed_ips, allowed_destinations, allowed_stanza_types, access_commands]. + fun (A) when is_list(A) -> A end. + +mod_options(_Host) -> + [{allowed_ips, all}, + {allowed_destinations, all}, + {allowed_stanza_types, all}, + {access_commands, []}].