Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 4839:4905aed00382
muc.lib: return feature-not-implemented when a foregoing discovery node is specified in a disco#info request.
author | Marco Cirillo <maranda@lightwitch.org> |
---|---|
date | Thu, 10 May 2012 23:37:36 +0000 |
parent | 4785:36234dc4b177 |
child | 4874:4e9781a61242 |
comparison
equal
deleted
inserted
replaced
4838:661752889535 | 4839:4905aed00382 |
---|---|
742 function room_mt:handle_to_room(origin, stanza) -- presence changes and groupchat messages, along with disco/etc | 742 function room_mt:handle_to_room(origin, stanza) -- presence changes and groupchat messages, along with disco/etc |
743 local type = stanza.attr.type; | 743 local type = stanza.attr.type; |
744 local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns; | 744 local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns; |
745 if stanza.name == "iq" then | 745 if stanza.name == "iq" then |
746 if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" then | 746 if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" then |
747 origin.send(self:get_disco_info(stanza)); | 747 if stanza.tags[1].attr.node then |
748 origin.send(st.error_reply(stanza, "cancel", "feature-not-implemented")); | |
749 else | |
750 origin.send(self:get_disco_info(stanza)); | |
751 end | |
748 elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" then | 752 elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" then |
749 origin.send(self:get_disco_items(stanza)); | 753 origin.send(self:get_disco_items(stanza)); |
750 elseif xmlns == "http://jabber.org/protocol/muc#admin" then | 754 elseif xmlns == "http://jabber.org/protocol/muc#admin" then |
751 local actor = stanza.attr.from; | 755 local actor = stanza.attr.from; |
752 local affiliation = self:get_affiliation(actor); | 756 local affiliation = self:get_affiliation(actor); |