aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-10-21 13:32:32 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-10-21 13:32:32 +0500
commit5479ec407ced79375e25705490c7f036fca1cce2 (patch)
tree67cb04ef6c60b2dee1f462e3ade68b624ba8b3e1 /plugins/muc/muc.lib.lua
parentfe9ea9641ba0ac94afe943d47b44cb3305356a95 (diff)
downloadprosody-5479ec407ced79375e25705490c7f036fca1cce2.tar.gz
prosody-5479ec407ced79375e25705490c7f036fca1cce2.zip
MUC: List occupants in a room's disco#items response.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 8719f975..7a635e8e 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -187,7 +187,11 @@ local function room_get_disco_info(self, stanza)
:tag("feature", {var="http://jabber.org/protocol/muc"});
end
local function room_get_disco_items(self, stanza)
- return st.reply(stanza):query("http://jabber.org/protocol/disco#items");
+ local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");
+ for room_jid in pairs(self._occupants) do
+ reply:tag("item", {jid = room_jid, name = room_jid:match("/(.*)")}):up();
+ end
+ return reply;
end
function room_mt:set_subject(current_nick, subject)
-- TODO check nick's authority