diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-03-10 11:29:47 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-03-10 11:29:47 +0000 |
commit | 05cd95bf80167c87312b04107a3f2abc25e83094 (patch) | |
tree | 479c845b81a7d47465c3223177a7119dbe3dd7ba /plugins/muc/muc.lib.lua | |
parent | 4c01dc18780c4b0b93616093c86b2c9cff3d12f2 (diff) | |
parent | e39fde236178e9d41cf0b1f56aae0aad382df96b (diff) | |
download | prosody-05cd95bf80167c87312b04107a3f2abc25e83094.tar.gz prosody-05cd95bf80167c87312b04107a3f2abc25e83094.zip |
Merge 0.9->trunk
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 16a0238d..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; @@ -987,7 +983,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, callback, reason) return true; end if actor_affiliation ~= "owner" then - if actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then + if affiliation == "owner" or affiliation == "admin" or actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then return nil, "cancel", "not-allowed"; end elseif target_affiliation == "owner" and jid_bare(actor) == jid then -- self change |