diff options
author | Waqas Hussain <waqas20@gmail.com> | 2013-02-26 23:56:44 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2013-02-26 23:56:44 +0500 |
commit | 0af578025c16fbdb255ed39801590a2537409bf1 (patch) | |
tree | 67e902d6fb7d40fb4e573be1142ded217d3f9806 /plugins/muc/muc.lib.lua | |
parent | 0db5373bfc837f667252b925aefc39d00a90c937 (diff) | |
download | prosody-0af578025c16fbdb255ed39801590a2537409bf1.tar.gz prosody-0af578025c16fbdb255ed39801590a2537409bf1.zip |
MUC: Always return <service-unavailable/> when a node is present in service discovery requests.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index a48c9935..91b4792d 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -765,13 +765,9 @@ function room_mt:handle_to_room(origin, stanza) -- presence changes and groupcha local type = stanza.attr.type; local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns; if stanza.name == "iq" then - if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" then - if stanza.tags[1].attr.node then - origin.send(st.error_reply(stanza, "cancel", "feature-not-implemented")); - else - origin.send(self:get_disco_info(stanza)); - end - elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" then + if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" and not stanza.tags[1].attr.node then + origin.send(self:get_disco_info(stanza)); + elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" and not stanza.tags[1].attr.node then origin.send(self:get_disco_items(stanza)); elseif xmlns == "http://jabber.org/protocol/muc#admin" then local actor = stanza.attr.from; |