Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Wed Oct 21 12:02:30 2009 +0500 +++ b/plugins/muc/muc.lib.lua Wed Oct 21 13:32:32 2009 +0500 @@ -187,7 +187,11 @@ :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