Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 5335:bb81c13d2c6f
MUC: Always return <service-unavailable/> when a node is present in service discovery requests.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 26 Feb 2013 23:56:44 +0500 |
| parents | da7857891eb8 |
| children | ed55a48270be |
comparison
equal
deleted
inserted
replaced
| 5334:da7857891eb8 | 5335:bb81c13d2c6f |
|---|---|
| 763 | 763 |
| 764 function room_mt:handle_to_room(origin, stanza) -- presence changes and groupchat messages, along with disco/etc | 764 function room_mt:handle_to_room(origin, stanza) -- presence changes and groupchat messages, along with disco/etc |
| 765 local type = stanza.attr.type; | 765 local type = stanza.attr.type; |
| 766 local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns; | 766 local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns; |
| 767 if stanza.name == "iq" then | 767 if stanza.name == "iq" then |
| 768 if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" then | 768 if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" and not stanza.tags[1].attr.node then |
| 769 if stanza.tags[1].attr.node then | 769 origin.send(self:get_disco_info(stanza)); |
| 770 origin.send(st.error_reply(stanza, "cancel", "feature-not-implemented")); | 770 elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" and not stanza.tags[1].attr.node then |
| 771 else | |
| 772 origin.send(self:get_disco_info(stanza)); | |
| 773 end | |
| 774 elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" then | |
| 775 origin.send(self:get_disco_items(stanza)); | 771 origin.send(self:get_disco_items(stanza)); |
| 776 elseif xmlns == "http://jabber.org/protocol/muc#admin" then | 772 elseif xmlns == "http://jabber.org/protocol/muc#admin" then |
| 777 local actor = stanza.attr.from; | 773 local actor = stanza.attr.from; |
| 778 local affiliation = self:get_affiliation(actor); | 774 local affiliation = self:get_affiliation(actor); |
| 779 local current_nick = self._jid_nick[actor]; | 775 local current_nick = self._jid_nick[actor]; |
