Mercurial > prosody-hg
comparison plugins/muc/mod_muc.lua @ 3262:330010ef078f
MUC: Updated code to use :set_hidden() and :is_hidden().
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sun, 13 Jun 2010 21:58:46 +0500 |
| parents | 692b3c6c5bd2 |
| children | bdc325ce9fbc |
comparison
equal
deleted
inserted
replaced
| 3261:fe1c93296abd | 3262:330010ef078f |
|---|---|
| 76 :tag("feature", {var="http://jabber.org/protocol/muc"}); -- TODO cache disco reply | 76 :tag("feature", {var="http://jabber.org/protocol/muc"}); -- TODO cache disco reply |
| 77 end | 77 end |
| 78 local function get_disco_items(stanza) | 78 local function get_disco_items(stanza) |
| 79 local reply = st.iq({type='result', id=stanza.attr.id, from=muc_host, to=stanza.attr.from}):query("http://jabber.org/protocol/disco#items"); | 79 local reply = st.iq({type='result', id=stanza.attr.id, from=muc_host, to=stanza.attr.from}):query("http://jabber.org/protocol/disco#items"); |
| 80 for jid, room in pairs(rooms) do | 80 for jid, room in pairs(rooms) do |
| 81 if not room._data.hidden then | 81 if not room:is_hidden() then |
| 82 reply:tag("item", {jid=jid, name=jid}):up(); | 82 reply:tag("item", {jid=jid, name=jid}):up(); |
| 83 end | 83 end |
| 84 end | 84 end |
| 85 return reply; -- TODO cache disco reply | 85 return reply; -- TODO cache disco reply |
| 86 end | 86 end |
