Software /
code /
prosody
Changeset
6184:2bfc4b12ec8f
plugins/muc/muc.lib: Allow `:send_occupant_list` to have no filter
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Fri, 28 Mar 2014 13:14:33 -0400 |
parents | 6183:a8e777a19816 |
children | 6185:d4a8840e72f9 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Fri Mar 28 13:11:11 2014 -0400 +++ b/plugins/muc/muc.lib.lua Fri Mar 28 13:14:33 2014 -0400 @@ -276,7 +276,7 @@ local to_occupant = self:get_occupant_by_real_jid(to); local has_anonymous = self:get_whois() ~= "anyone" for occupant_jid, occupant in self:each_occupant() do - if filter and filter(occupant_jid, occupant) then + if filter == nil or filter(occupant_jid, occupant) then local x = st.stanza("x", {xmlns='http://jabber.org/protocol/muc#user'}); local is_anonymous = has_anonymous and occupant.role ~= "moderator" and to_occupant.bare_jid ~= occupant.bare_jid; self:build_item_list(occupant, x, is_anonymous);