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/mod_muc.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/mod_muc.lua')
-rw-r--r-- | plugins/muc/mod_muc.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 0df8b790..9f907f17 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -126,9 +126,10 @@ local function handle_to_domain(event) if type == "error" or type == "result" then return; end if stanza.name == "iq" and type == "get" then local xmlns = stanza.tags[1].attr.xmlns; - if xmlns == "http://jabber.org/protocol/disco#info" then + local node = stanza.tags[1].attr.node; + if xmlns == "http://jabber.org/protocol/disco#info" and not node then origin.send(get_disco_info(stanza)); - elseif xmlns == "http://jabber.org/protocol/disco#items" then + elseif xmlns == "http://jabber.org/protocol/disco#items" and not node then origin.send(get_disco_items(stanza)); elseif xmlns == "http://jabber.org/protocol/muc#unique" then origin.send(st.reply(stanza):tag("unique", {xmlns = xmlns}):text(uuid_gen())); -- FIXME Random UUIDs can theoretically have collisions |