diff options
author | daurnimator <quae@daurnimator.com> | 2014-03-28 13:14:33 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-03-28 13:14:33 -0400 |
commit | f9f2d557fa2db46dbdbc510c4a326be26b237e52 (patch) | |
tree | 208f5a906ec8e1481fedc6c2f733025f8a680cd7 /plugins/muc | |
parent | 46f318fa4f74a2194d98e8b082c97f7a62296077 (diff) | |
download | prosody-f9f2d557fa2db46dbdbc510c4a326be26b237e52.tar.gz prosody-f9f2d557fa2db46dbdbc510c4a326be26b237e52.zip |
plugins/muc/muc.lib: Allow `:send_occupant_list` to have no filter
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 0d1e4170..b5b8bc97 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -276,7 +276,7 @@ function room_mt:send_occupant_list(to, filter) 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); |