mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
Merge 0.11->trunk
This commit is contained in:
commit
a399b1caed
2 changed files with 98 additions and 72 deletions
|
@ -1110,7 +1110,7 @@ function room_mt:handle_admin_query_get_command(origin, stanza)
|
||||||
-- e.g. an admin can't ask for a list of owners
|
-- e.g. an admin can't ask for a list of owners
|
||||||
local affiliation_rank = valid_affiliations[affiliation or "none"];
|
local affiliation_rank = valid_affiliations[affiliation or "none"];
|
||||||
if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank)
|
if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank)
|
||||||
or (self:get_whois() == "anyone") then
|
or (self:get_members_only() and self:get_whois() == "anyone" and affiliation_rank >= valid_affiliations.member) then
|
||||||
local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin");
|
local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin");
|
||||||
for jid in self:each_affiliation(_aff or "none") do
|
for jid in self:each_affiliation(_aff or "none") do
|
||||||
local nick = self:get_registered_nick(jid);
|
local nick = self:get_registered_nick(jid);
|
||||||
|
|
|
@ -1,101 +1,127 @@
|
||||||
# MUC: Allow members to fetch the affiliation lists in open non-anonymous rooms
|
# MUC: Allow members to fetch the affiliation lists in open non-anonymous rooms
|
||||||
|
|
||||||
[Client] Romeo
|
[Client] Romeo
|
||||||
jid: romeo@localhost/MsliYo9C
|
jid: 4e2pm7er@localhost
|
||||||
password: password
|
password: password
|
||||||
|
|
||||||
[Client] Juliet
|
[Client] Juliet
|
||||||
jid: juliet@localhost/vJrUtY4Z
|
jid: qnjm5253@localhost
|
||||||
|
password: password
|
||||||
|
|
||||||
|
[Client] Random
|
||||||
|
jid: iqizbcus@localhost
|
||||||
password: password
|
password: password
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Romeo connects
|
Romeo connects
|
||||||
|
|
||||||
Romeo sends:
|
|
||||||
<presence to='issue1230@conference.localhost/romeo'>
|
|
||||||
<x xmlns='http://jabber.org/protocol/muc'/>
|
|
||||||
</presence>
|
|
||||||
|
|
||||||
Romeo receives:
|
|
||||||
<presence from='issue1230@conference.localhost/romeo'>
|
|
||||||
<x xmlns='http://jabber.org/protocol/muc#user'>
|
|
||||||
<status code='201'/>
|
|
||||||
<item jid="${Romeo's JID}" role='moderator' affiliation='owner'/>
|
|
||||||
<status code='110'/>
|
|
||||||
</x>
|
|
||||||
</presence>
|
|
||||||
|
|
||||||
Romeo receives:
|
|
||||||
<message from='issue1230@conference.localhost' type='groupchat'>
|
|
||||||
<subject/>
|
|
||||||
</message>
|
|
||||||
|
|
||||||
Romeo sends:
|
|
||||||
<iq id='lx3' type='set' to='issue1230@conference.localhost'>
|
|
||||||
<query xmlns='http://jabber.org/protocol/muc#owner'>
|
|
||||||
<x type='submit' xmlns='jabber:x:data'>
|
|
||||||
<field var='FORM_TYPE'>
|
|
||||||
<value>http://jabber.org/protocol/muc#roomconfig</value>
|
|
||||||
</field>
|
|
||||||
<field var='muc#roomconfig_whois'>
|
|
||||||
<value>anyone</value>
|
|
||||||
</field>
|
|
||||||
</x>
|
|
||||||
</query>
|
|
||||||
</iq>
|
|
||||||
|
|
||||||
Romeo receives:
|
|
||||||
<iq from='issue1230@conference.localhost' type='result' id='lx3'/>
|
|
||||||
|
|
||||||
Romeo receives:
|
|
||||||
<message from='issue1230@conference.localhost' type='groupchat'>
|
|
||||||
<x xmlns='http://jabber.org/protocol/muc#user'>
|
|
||||||
<status code='172'/>
|
|
||||||
</x>
|
|
||||||
</message>
|
|
||||||
|
|
||||||
Juliet connects
|
Juliet connects
|
||||||
|
|
||||||
Juliet sends:
|
Random connects
|
||||||
<presence to='issue1230@conference.localhost/juliet'>
|
|
||||||
<x xmlns='http://jabber.org/protocol/muc'/>
|
# Romeo joins and creates the MUC
|
||||||
|
Romeo sends:
|
||||||
|
<presence to="mcgczevx@conference.localhost/Romeo">
|
||||||
|
<x xmlns="http://jabber.org/protocol/muc"/>
|
||||||
</presence>
|
</presence>
|
||||||
|
|
||||||
Juliet receives:
|
Romeo receives:
|
||||||
<presence from='issue1230@conference.localhost/romeo'>
|
<presence from="mcgczevx@conference.localhost/Romeo">
|
||||||
<x xmlns='http://jabber.org/protocol/muc#user'>
|
<x xmlns="http://jabber.org/protocol/muc#user" scansion:strict="false">
|
||||||
<item jid="${Romeo's JID}" role='moderator' affiliation='owner'/>
|
<item affiliation="owner" jid="${Romeo's full JID}" role="moderator"/>
|
||||||
</x>
|
<status code="110"/>
|
||||||
|
<status code="201"/>
|
||||||
|
</x>
|
||||||
</presence>
|
</presence>
|
||||||
|
|
||||||
Juliet receives:
|
Romeo receives:
|
||||||
<presence from='issue1230@conference.localhost/juliet'>
|
<message from="mcgczevx@conference.localhost" type="groupchat">
|
||||||
<x xmlns='http://jabber.org/protocol/muc#user'>
|
<subject/>
|
||||||
<status code='100'/>
|
|
||||||
<item jid="${Juliet's JID}" role='participant' affiliation='none'/>
|
|
||||||
<status code='110'/>
|
|
||||||
</x>
|
|
||||||
</presence>
|
|
||||||
|
|
||||||
Juliet receives:
|
|
||||||
<message from='issue1230@conference.localhost' type='groupchat'>
|
|
||||||
<subject/>
|
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
# and configures it for private chat
|
||||||
|
Romeo sends:
|
||||||
|
<iq type="set" id="17fb8e7e-c75e-447c-b86f-3f1df8f507c4" to="mcgczevx@conference.localhost">
|
||||||
|
<query xmlns="http://jabber.org/protocol/muc#owner">
|
||||||
|
<x type="submit" xmlns="jabber:x:data">
|
||||||
|
<field var="FORM_TYPE">
|
||||||
|
<value>http://jabber.org/protocol/muc#roomconfig</value>
|
||||||
|
</field>
|
||||||
|
<field var="muc#roomconfig_membersonly">
|
||||||
|
<value>1</value>
|
||||||
|
</field>
|
||||||
|
<field var="muc#roomconfig_whois">
|
||||||
|
<value>anyone</value>
|
||||||
|
</field>
|
||||||
|
</x>
|
||||||
|
</query>
|
||||||
|
</iq>
|
||||||
|
|
||||||
|
Romeo receives:
|
||||||
|
<iq from="mcgczevx@conference.localhost" id="17fb8e7e-c75e-447c-b86f-3f1df8f507c4" type="result"/>
|
||||||
|
|
||||||
|
Romeo receives:
|
||||||
|
<message from="mcgczevx@conference.localhost" type="groupchat">
|
||||||
|
<x xmlns="http://jabber.org/protocol/muc#user" scansion:strict="false">
|
||||||
|
<status code="104"/>
|
||||||
|
<status code="172"/>
|
||||||
|
</x>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
# Juliet is made a member
|
||||||
|
Romeo sends:
|
||||||
|
<iq type="set" id="32d81574-e1dc-4221-b36d-4c44debb7c19" to="mcgczevx@conference.localhost">
|
||||||
|
<query xmlns="http://jabber.org/protocol/muc#admin">
|
||||||
|
<item affiliation="member" jid="${Juliet's JID}"/>
|
||||||
|
</query>
|
||||||
|
</iq>
|
||||||
|
|
||||||
|
# Juliet can read affiliations
|
||||||
Juliet sends:
|
Juliet sends:
|
||||||
<iq id='lx2' type='get' to='issue1230@conference.localhost'>
|
<iq type="get" id="32d81574-e1dc-4221-b36d-4c44debb7c19" to="mcgczevx@conference.localhost">
|
||||||
<query xmlns='http://jabber.org/protocol/muc#admin'>
|
<query xmlns="http://jabber.org/protocol/muc#admin">
|
||||||
<item affiliation='member'/>
|
<item affiliation="owner"/>
|
||||||
</query>
|
</query>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
Juliet receives:
|
Juliet receives:
|
||||||
<iq from='issue1230@conference.localhost' type='result' id='lx2'>
|
<iq from="mcgczevx@conference.localhost" id="32d81574-e1dc-4221-b36d-4c44debb7c19" type="result">
|
||||||
<query xmlns='http://jabber.org/protocol/muc#admin'/>
|
<query xmlns="http://jabber.org/protocol/muc#admin">
|
||||||
|
<item affiliation="owner" jid="${Romeo's JID}"/>
|
||||||
|
</query>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
|
Juliet sends:
|
||||||
|
<iq type="get" id="05e3fe30-976f-4919-8221-ca1ac333eb9b" to="mcgczevx@conference.localhost">
|
||||||
|
<query xmlns="http://jabber.org/protocol/muc#admin">
|
||||||
|
<item affiliation="member"/>
|
||||||
|
</query>
|
||||||
|
</iq>
|
||||||
|
|
||||||
|
Juliet receives:
|
||||||
|
<iq from="mcgczevx@conference.localhost" id="05e3fe30-976f-4919-8221-ca1ac333eb9b" type="result">
|
||||||
|
<query xmlns="http://jabber.org/protocol/muc#admin">
|
||||||
|
<item affiliation="member" jid="${Juliet's JID}"/>
|
||||||
|
</query>
|
||||||
|
</iq>
|
||||||
|
|
||||||
|
# Others can't read affiliations
|
||||||
|
Random sends:
|
||||||
|
<iq type="get" id="df1195e1-7ec8-4102-8561-3e3a1d942adf" to="mcgczevx@conference.localhost">
|
||||||
|
<query xmlns="http://jabber.org/protocol/muc#admin">
|
||||||
|
<item affiliation="owner"/>
|
||||||
|
</query>
|
||||||
|
</iq>
|
||||||
|
|
||||||
|
Random receives:
|
||||||
|
<iq from="mcgczevx@conference.localhost" id="df1195e1-7ec8-4102-8561-3e3a1d942adf" type="error"/>
|
||||||
|
|
||||||
|
|
||||||
Juliet disconnects
|
Juliet disconnects
|
||||||
|
|
||||||
Romeo disconnects
|
Romeo disconnects
|
||||||
|
|
||||||
|
Random disconnects
|
||||||
|
|
||||||
|
# recording ended on 2021-07-23T12:09:48Z
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue