Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 2035:b8c3dbf76a2e
MUC: List occupants in a room's disco#items response.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 21 Oct 2009 13:32:32 +0500 |
parent | 2008:6b6b924ee558 |
child | 2051:2567f4bf0085 |
comparison
equal
deleted
inserted
replaced
2034:38d4694828e6 | 2035:b8c3dbf76a2e |
---|---|
185 return st.reply(stanza):query("http://jabber.org/protocol/disco#info") | 185 return st.reply(stanza):query("http://jabber.org/protocol/disco#info") |
186 :tag("identity", {category="conference", type="text"}):up() | 186 :tag("identity", {category="conference", type="text"}):up() |
187 :tag("feature", {var="http://jabber.org/protocol/muc"}); | 187 :tag("feature", {var="http://jabber.org/protocol/muc"}); |
188 end | 188 end |
189 local function room_get_disco_items(self, stanza) | 189 local function room_get_disco_items(self, stanza) |
190 return st.reply(stanza):query("http://jabber.org/protocol/disco#items"); | 190 local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items"); |
191 for room_jid in pairs(self._occupants) do | |
192 reply:tag("item", {jid = room_jid, name = room_jid:match("/(.*)")}):up(); | |
193 end | |
194 return reply; | |
191 end | 195 end |
192 function room_mt:set_subject(current_nick, subject) | 196 function room_mt:set_subject(current_nick, subject) |
193 -- TODO check nick's authority | 197 -- TODO check nick's authority |
194 if subject == "" then subject = nil; end | 198 if subject == "" then subject = nil; end |
195 self._data['subject'] = subject; | 199 self._data['subject'] = subject; |