Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 6269:f89d2dec2977
plugins/muc/muc.lib: Fix incorrect whois logic (thanks mva)
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Sun, 01 Jun 2014 15:40:04 -0400 |
parent | 6268:23cb8a78ecc6 |
child | 6272:90054f21d1af |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sun Jun 01 04:42:55 2014 -0400 +++ b/plugins/muc/muc.lib.lua Sun Jun 01 15:40:04 2014 -0400 @@ -252,14 +252,14 @@ function room_mt:send_occupant_list(to, filter) local to_bare = jid_bare(to); - local is_anonymous = true; + local is_anonymous = false; local whois = self:get_whois(); if whois ~= "anyone" then local affiliation = self:get_affiliation(to); if affiliation ~= "admin" and affiliation ~= "owner" then local occupant = self:get_occupant_by_real_jid(to); - if not occupant or can_see_real_jids(whois, occupant) then - is_anonymous = false; + if not (occupant and can_see_real_jids(whois, occupant)) then + is_anonymous = true; end end end