Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 7443:4a178edc9847
MUC: Allow members (or above) in members-only non-anonymous rooms to see the member list (fixes #445)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 28 May 2016 12:37:51 +0200 |
parent | 7385:17929cdacec2 |
child | 7444:45d28235ebe0 |
child | 7684:65ba769d9f05 |
comparison
equal
deleted
inserted
replaced
7442:156c95bfed0b | 7443:4a178edc9847 |
---|---|
801 end | 801 end |
802 elseif type == "get" then | 802 elseif type == "get" then |
803 local _aff = item.attr.affiliation; | 803 local _aff = item.attr.affiliation; |
804 local _rol = item.attr.role; | 804 local _rol = item.attr.role; |
805 if _aff and not _rol then | 805 if _aff and not _rol then |
806 if affiliation == "owner" or (affiliation == "admin" and _aff ~= "owner" and _aff ~= "admin") then | 806 if affiliation == "owner" or (affiliation == "admin" and _aff ~= "owner" and _aff ~= "admin") |
807 or (affiliation and affiliation ~= "outcast" and self:get_members_only() and self:get_whois() == "anyone") then | |
807 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); | 808 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); |
808 for jid, affiliation in pairs(self._affiliations) do | 809 for jid, affiliation in pairs(self._affiliations) do |
809 if affiliation == _aff then | 810 if affiliation == _aff then |
810 reply:tag("item", {affiliation = _aff, jid = jid}):up(); | 811 reply:tag("item", {affiliation = _aff, jid = jid}):up(); |
811 end | 812 end |