mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Only respond with occupants list to disco#items with empty node
Fixes #2942
This commit is contained in:
parent
4ec78736b9
commit
104c4093dc
@ -4093,7 +4093,8 @@ iq_disco_info_extras(Lang, StateData, Static) ->
|
|||||||
process_iq_disco_items(_From, #iq{type = set, lang = Lang}, _StateData) ->
|
process_iq_disco_items(_From, #iq{type = set, lang = Lang}, _StateData) ->
|
||||||
Txt = ?T("Value 'set' of 'type' attribute is not allowed"),
|
Txt = ?T("Value 'set' of 'type' attribute is not allowed"),
|
||||||
{error, xmpp:err_not_allowed(Txt, Lang)};
|
{error, xmpp:err_not_allowed(Txt, Lang)};
|
||||||
process_iq_disco_items(From, #iq{type = get}, StateData) ->
|
process_iq_disco_items(From, #iq{type = get, sub_els = [#disco_items{node = <<>>}]},
|
||||||
|
StateData) ->
|
||||||
case (StateData#state.config)#config.public_list of
|
case (StateData#state.config)#config.public_list of
|
||||||
true ->
|
true ->
|
||||||
{result, get_mucroom_disco_items(StateData)};
|
{result, get_mucroom_disco_items(StateData)};
|
||||||
@ -4107,7 +4108,10 @@ process_iq_disco_items(From, #iq{type = get}, StateData) ->
|
|||||||
%% (http://xmpp.org/extensions/xep-0045.html#disco-roomitems)
|
%% (http://xmpp.org/extensions/xep-0045.html#disco-roomitems)
|
||||||
{result, #disco_items{}}
|
{result, #disco_items{}}
|
||||||
end
|
end
|
||||||
end.
|
end;
|
||||||
|
process_iq_disco_items(_From, #iq{lang = Lang}, _StateData) ->
|
||||||
|
Txt = ?T("Node not found"),
|
||||||
|
{error, xmpp:err_item_not_found(Txt, Lang)}.
|
||||||
|
|
||||||
-spec process_iq_captcha(jid(), iq(), state()) -> {error, stanza_error()} |
|
-spec process_iq_captcha(jid(), iq(), state()) -> {error, stanza_error()} |
|
||||||
{result, undefined}.
|
{result, undefined}.
|
||||||
|
Loading…
Reference in New Issue
Block a user