mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
mod_register: Don't advertise IBR unconditionally
Don't advertise the IBR stream feature if registration is disabled in the configuration.
This commit is contained in:
parent
59ce0ba6c8
commit
2eb907dc7f
1 changed files with 8 additions and 2 deletions
|
@ -73,8 +73,14 @@ depends(_Host, _Opts) ->
|
||||||
[].
|
[].
|
||||||
|
|
||||||
-spec stream_feature_register([xmpp_element()], binary()) -> [xmpp_element()].
|
-spec stream_feature_register([xmpp_element()], binary()) -> [xmpp_element()].
|
||||||
stream_feature_register(Acc, _Host) ->
|
stream_feature_register(Acc, Host) ->
|
||||||
[#feature_register{}|Acc].
|
case {gen_mod:get_module_opt(Host, ?MODULE, access),
|
||||||
|
gen_mod:get_module_opt(Host, ?MODULE, ip_access),
|
||||||
|
gen_mod:get_module_opt(Host, ?MODULE, redirect_url)} of
|
||||||
|
{none, _, <<>>} -> Acc;
|
||||||
|
{_, none, <<>>} -> Acc;
|
||||||
|
{_, _, _} -> [#feature_register{}|Acc]
|
||||||
|
end.
|
||||||
|
|
||||||
c2s_unauthenticated_packet(#{ip := IP, server := Server} = State,
|
c2s_unauthenticated_packet(#{ip := IP, server := Server} = State,
|
||||||
#iq{type = T, sub_els = [_]} = IQ)
|
#iq{type = T, sub_els = [_]} = IQ)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue