disco_local_features({result, []}, From, To, Node, Lang);
disco_local_features({result, OtherFeatures} = Acc, From,
#jid{lserver = LServer}, <<"">>, _Lang) ->
- Access = gen_mod:get_module_opt(LServer, ?MODULE, access),
+ Access = mod_jidprep_opt:access(LServer),
case acl:match_rule(LServer, Access, From) of
allow ->
{result, [?NS_JIDPREP_0 | OtherFeatures]};
sub_els = [#jidprep{jid = #jid{luser = U,
lserver = S,
lresource = R} = JID}]} = IQ) ->
- Access = gen_mod:get_module_opt(LServer, ?MODULE, access),
+ Access = mod_jidprep_opt:access(LServer),
case acl:match_rule(LServer, Access, From) of
allow ->
case jid:make(U, S, R) of
--- /dev/null
+%% Generated automatically
+%% DO NOT EDIT: run `make options` instead
+
+-module(mod_jidprep_opt).
+
+-export([access/1]).
+
+-spec access(gen_mod:opts() | global | binary()) -> 'local' | acl:acl().
+access(Opts) when is_map(Opts) ->
+ gen_mod:get_opt(access, Opts);
+access(Host) ->
+ gen_mod:get_module_opt(Host, mod_jidprep, access).
+