Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 9312:6cab07323274
MUC: Include 'nick' attribute in affiliation lists (thanks jc)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 14 Sep 2018 12:05:47 +0100 |
parent | 9299:2466b533f63d |
child | 9315:a47bba3b35f3 |
comparison
equal
deleted
inserted
replaced
9311:9b0604fe01f1 | 9312:6cab07323274 |
---|---|
963 local affiliation_rank = valid_affiliations[affiliation or "none"]; | 963 local affiliation_rank = valid_affiliations[affiliation or "none"]; |
964 if affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank | 964 if affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank |
965 or self:get_members_only() and self:get_whois() == "anyone" and affiliation_rank >= valid_affiliations.member then | 965 or self:get_members_only() and self:get_whois() == "anyone" and affiliation_rank >= valid_affiliations.member then |
966 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); | 966 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); |
967 for jid in self:each_affiliation(_aff or "none") do | 967 for jid in self:each_affiliation(_aff or "none") do |
968 reply:tag("item", {affiliation = _aff, jid = jid}):up(); | 968 local nick = self:get_registered_nick(jid); |
969 reply:tag("item", {affiliation = _aff, jid = jid, nick = nick }):up(); | |
969 end | 970 end |
970 origin.send(reply:up()); | 971 origin.send(reply:up()); |
971 return true; | 972 return true; |
972 else | 973 else |
973 origin.send(st.error_reply(stanza, "auth", "forbidden")); | 974 origin.send(st.error_reply(stanza, "auth", "forbidden")); |