util.encodings: Spell out all IDNA 2008 options ICU has
[prosody.git] / spec / scansion / muc_affiliation_notify.scs
blobe7d21fcd053b352a62b07d6e043cf801a8471932
1 # MUC: Notification of affiliation changes of non-occupants
3 [Client] Romeo
4         jid: user@localhost
5         password: password
7 [Client] Juliet
8         jid: user2@localhost
9         password: password
11 [Client] Rosaline
12         jid: user3@localhost
13         password: password
15 -----
17 Romeo connects
19 Romeo sends:
20         <presence to="room@conference.localhost/Romeo">
21                 <x xmlns="http://jabber.org/protocol/muc"/>
22         </presence>
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>
33 Romeo receives:
34         <message type='groupchat' from='room@conference.localhost'><subject/></message>
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>
48 Romeo receives:
49         <iq id="config1" from="room@conference.localhost" type="result">
50         </iq>
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>
60 # Juliet is not in the room, so an affiliation change message is received
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>
69 # The affiliation change succeeded
71 Romeo receives:
72         <iq from='room@conference.localhost' id='member1' type='result'/>
74 # Juliet connects, and joins the room
75 Juliet connects
77 Juliet sends:
78         <presence to="room@conference.localhost/Juliet">
79                 <x xmlns="http://jabber.org/protocol/muc"/>
80         </presence>
82 Juliet receives:
83         <presence from="room@conference.localhost/Romeo" />
85 Juliet receives:
86         <presence from="room@conference.localhost/Juliet" />
88 Juliet receives:
89         <message type='groupchat' from='room@conference.localhost'><subject/></message>
91 Romeo receives:
92         <presence from="room@conference.localhost/Juliet" />
94 # To check the status of the room is as expected, Romeo requests the member list
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>
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>
110 # Romeo grants membership to Rosaline, who is not in the room
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>
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>
126 Romeo receives:
127         <iq type='result' id='member2' from='room@conference.localhost' />
129 Romeo sends:
130         <message type="groupchat" to="room@conference.localhost">
131                 <body>Finished!</body>
132         </message>
134 Juliet receives:
135         <message type="groupchat" from="room@conference.localhost/Romeo">
136                 <body>Finished!</body>
137         </message>