Comparison

spec/scansion/muc_affiliation_notify.scs @ 9599:5a2135964ed3 0.11

MUC: Announce affiliation changes for JIDs that are not in the room
author Matthew Wild <mwild1@gmail.com>
date Wed, 31 Oct 2018 13:13:05 +0000
child 9602:b250ffdfae3f
comparison
equal deleted inserted replaced
9597:17d43543f9b6 9599:5a2135964ed3
1 # MUC: Notification of affiliation changes of non-occupants
2
3 [Client] Romeo
4 jid: user@localhost
5 password: password
6
7 [Client] Juliet
8 jid: user2@localhost
9 password: password
10
11 [Client] Rosaline
12 jid: user3@localhost
13 password: password
14
15 -----
16
17 Romeo connects
18
19 Romeo sends:
20 <presence to="room@conference.localhost/Romeo">
21 <x xmlns="http://jabber.org/protocol/muc"/>
22 </presence>
23
24 Romeo receives:
25 <presence from='room@conference.localhost/Romeo'>
26 <x xmlns='http://jabber.org/protocol/muc#user'>
27 <status code='201'/>
28 <item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/>
29 <status code='110'/>
30 </x>
31 </presence>
32
33 Romeo receives:
34 <message type='groupchat' from='room@conference.localhost'><subject/></message>
35
36 # Submit config form
37 Romeo sends:
38 <iq id='config1' to='room@conference.localhost' type='set'>
39 <query xmlns='http://jabber.org/protocol/muc#owner'>
40 <x xmlns='jabber:x:data' type='submit'>
41 <field var='FORM_TYPE'>
42 <value>http://jabber.org/protocol/muc#roomconfig</value>
43 </field>
44 </x>
45 </query>
46 </iq>
47
48 Romeo receives:
49 <iq id="config1" from="room@conference.localhost" type="result">
50 </iq>
51
52 # Promote Juliet to member
53 Romeo sends:
54 <iq id='member1' to='room@conference.localhost' type='set'>
55 <query xmlns='http://jabber.org/protocol/muc#admin'>
56 <item affiliation='member' jid="${Juliet's JID}" />
57 </query>
58 </iq>
59
60 # Juliet is not in the room, so an affiliation change message is received
61
62 Romeo receives:
63 <message from='room@conference.localhost'>
64 <x xmlns='http://jabber.org/protocol/muc#user'>
65 <item jid="${Juliet's JID}" affiliation='member' xmlns='http://jabber.org/protocol/muc#user'/>
66 </x>
67 </message>
68
69 # The affiliation change succeeded
70
71 Romeo receives:
72 <iq from='room@conference.localhost' id='member1' type='result'/>
73
74 # Juliet connects, and joins the room
75 Juliet connects
76
77 Juliet sends:
78 <presence to="room@conference.localhost/Juliet">
79 <x xmlns="http://jabber.org/protocol/muc"/>
80 </presence>
81
82 Juliet receives:
83 <presence from="room@conference.localhost/Romeo" />
84
85 Juliet receives:
86 <presence from="room@conference.localhost/Juliet" />
87
88 Juliet receives:
89 <message type='groupchat' from='room@conference.localhost'><subject/></message>
90
91 Romeo receives:
92 <presence from="room@conference.localhost/Juliet" />
93
94 # To check the status of the room is as expected, Romeo requests the member list
95
96 Romeo sends:
97 <iq id='member3' to='room@conference.localhost' type='get'>
98 <query xmlns='http://jabber.org/protocol/muc#admin'>
99 <item affiliation='member'/>
100 </query>
101 </iq>
102
103 Romeo receives:
104 <iq from='room@conference.localhost' type='result' id='member3'>
105 <query xmlns='http://jabber.org/protocol/muc#admin'>
106 <item affiliation='member' jid="${Juliet's JID}" />
107 </query>
108 </iq>
109
110 # Romeo grants membership to Rosaline, who is not in the room
111
112 Romeo sends:
113 <iq id='member2' to='room@conference.localhost' type='set'>
114 <query xmlns='http://jabber.org/protocol/muc#admin'>
115 <item affiliation='member' jid="${Rosaline's JID}" />
116 </query>
117 </iq>
118
119 Romeo receives:
120 <message from='room@conference.localhost'>
121 <x xmlns='http://jabber.org/protocol/muc#user'>
122 <item jid="${Rosaline's JID}" affiliation='member' xmlns='http://jabber.org/protocol/muc#user'/>
123 </x>
124 </message>
125
126 Romeo receives:
127 <iq type='result' id='member2' from='room@conference.localhost' />
128
129 Romeo sends:
130 <message type="groupchat" to="room@conference.localhost">
131 <body>Finished!</body>
132 </message>
133
134 Juliet receives:
135 <message type="groupchat" from="room@conference.localhost/Romeo">
136 <body>Finished!</body>
137 </message>