25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix disco#items on pubsub nodes

SVN Revision: 2534
This commit is contained in:
Pablo Polvorin 2009-08-25 17:23:43 +00:00
parent 938a4007b3
commit b4f0bb65c6

View File

@ -1029,7 +1029,7 @@ node_disco_info(Host, Node, From, Identity, Features) ->
[];
true ->
Types =
case tree_call(Host, get_subnodes, [NodeId, From]) of
case tree_call(Host, get_subnodes, [Host, Node, From]) of
[] ->
["leaf"]; %% No sub-nodes: it's a leaf node
_ ->
@ -1117,7 +1117,7 @@ iq_disco_items(Host, Item, From) ->
RN = lists:last(SubNode),
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [?XMLATTR('jid', Host), ?XMLATTR('node', SN),
?XMLATTR('name', RN)]}
end, tree_call(Host, get_subnodes, [NodeId, From])),
end, tree_call(Host, get_subnodes, [Host, Node, From])),
Items = lists:map(
fun(#pubsub_item{itemid = {RN, _}}) ->
SN = node_to_string(Node) ++ "!" ++ RN,