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 | 8d5f9ece4d3712fa342fd13775f67b37664d4009 (patch) | |
tree | 208f5a906ec8e1481fedc6c2f733025f8a680cd7 /plugins/muc/muc.lib.lua | |
parent | 5ae44714df607f256b33d46eb6f15771eef815ff (diff) | |
download | prosody-8d5f9ece4d3712fa342fd13775f67b37664d4009.tar.gz prosody-8d5f9ece4d3712fa342fd13775f67b37664d4009.zip |
plugins/muc/muc.lib: Allow `:send_occupant_list` to have no filter
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-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); |