Software /
code /
prosody
Comparison
spec/scansion/muc_members_only_change.scs @ 9712:0d97768b0ea9 0.11
spec/scansion: Add tests for members-only rooms
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 19 Dec 2018 13:25:15 +0000 |
child | 9714:34c48eed4650 |
comparison
equal
deleted
inserted
replaced
9709:f31ed70c993a | 9712:0d97768b0ea9 |
---|---|
1 # MUC: Room registration and reserved nicknames | |
2 | |
3 [Client] Romeo | |
4 jid: user@localhost | |
5 password: password | |
6 | |
7 [Client] Juliet | |
8 jid: user2@localhost | |
9 password: password | |
10 | |
11 ----- | |
12 | |
13 Romeo connects | |
14 | |
15 Romeo sends: | |
16 <presence to="room@conference.localhost/Romeo"> | |
17 <x xmlns="http://jabber.org/protocol/muc"/> | |
18 </presence> | |
19 | |
20 Romeo receives: | |
21 <presence from='room@conference.localhost/Romeo'> | |
22 <x xmlns='http://jabber.org/protocol/muc#user'> | |
23 <status code='201'/> | |
24 <item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/> | |
25 <status code='110'/> | |
26 </x> | |
27 </presence> | |
28 | |
29 Romeo receives: | |
30 <message type='groupchat' from='room@conference.localhost'><subject/></message> | |
31 | |
32 # Submit config form, set the room to members-only | |
33 Romeo sends: | |
34 <iq id='config1' to='room@conference.localhost' type='set'> | |
35 <query xmlns='http://jabber.org/protocol/muc#owner'> | |
36 <x xmlns='jabber:x:data' type='submit'> | |
37 <field var='FORM_TYPE'> | |
38 <value>http://jabber.org/protocol/muc#roomconfig</value> | |
39 </field> | |
40 <field var='muc#roomconfig_membersonly'> | |
41 <value>1</value> | |
42 </field> | |
43 </x> | |
44 </query> | |
45 </iq> | |
46 | |
47 Romeo receives: | |
48 <iq id="config1" from="room@conference.localhost" type="result"> | |
49 </iq> | |
50 | |
51 # Romeo adds Juliet to the member list | |
52 Romeo sends: | |
53 <iq id='member1' to='room@conference.localhost' type='set'> | |
54 <query xmlns='http://jabber.org/protocol/muc#admin'> | |
55 <item affiliation='member' jid="${Juliet's JID}" /> | |
56 </query> | |
57 </iq> | |
58 | |
59 Romeo receives: | |
60 <message from='room@conference.localhost'> | |
61 <x xmlns='http://jabber.org/protocol/muc#user'> | |
62 <item jid="${Juliet's JID}" affiliation='member' /> | |
63 </x> | |
64 </message> | |
65 | |
66 Romeo receives: | |
67 <iq from='room@conference.localhost' id='member1' type='result'/> | |
68 | |
69 # Juliet connects, and joins the room | |
70 Juliet connects | |
71 | |
72 Juliet sends: | |
73 <presence to="room@conference.localhost/Juliet"> | |
74 <x xmlns="http://jabber.org/protocol/muc"/> | |
75 </presence> | |
76 | |
77 Juliet receives: | |
78 <presence from="room@conference.localhost/Romeo" /> | |
79 | |
80 Juliet receives: | |
81 <presence from="room@conference.localhost/Juliet" /> | |
82 | |
83 Juliet receives: | |
84 <message type='groupchat' from='room@conference.localhost'><subject/></message> | |
85 | |
86 Romeo receives: | |
87 <presence from="room@conference.localhost/Juliet" /> | |
88 | |
89 | |
90 # Romeo removes Juliet's membership status | |
91 Romeo sends: | |
92 <iq id='member2' to='room@conference.localhost' type='set'> | |
93 <query xmlns='http://jabber.org/protocol/muc#admin'> | |
94 <item affiliation='none' jid="${Juliet's JID}" /> | |
95 </query> | |
96 </iq> | |
97 | |
98 # As a non-member, Juliet must now be removed from the room | |
99 Romeo receives: | |
100 <presence type='unavailable' from='room@conference.localhost/Juliet'> | |
101 <x xmlns='http://jabber.org/protocol/muc#user'> | |
102 <status code='321'/> | |
103 <item role='none' jid="${Juliet's full JID}" affiliation='none'> | |
104 <actor nick='Romeo' jid="${Romeo's full JID}"/> | |
105 </item> | |
106 </x> | |
107 </presence> | |
108 | |
109 Romeo receives: | |
110 <iq id='member2' type='result'/> | |
111 | |
112 Romeo disconnects | |
113 | |
114 Juliet disconnects |