Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 4846:3bc3498df0a0
Merge with Maranda
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 11 May 2012 01:53:32 +0100 |
| parents | 4905aed00382 |
| children | 4e9781a61242 |
comparison
equal
deleted
inserted
replaced
| 4834:878f75ccc4fb | 4846:3bc3498df0a0 |
|---|---|
| 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); |
