Skip to content

Commit 60b4389

Browse files
committed
Add some GC3 membership config
1 parent 451df4d commit 60b4389

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

gc3.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Client sends an iq set, optionally including the form. Not including the form is
8181

8282
#### Channel responds with result containing join details
8383

84+
This includes the subscription-jid (occupant JID), and also the membership configuration (which could contain fields not part of the join and is in the member-form rather than join-form (QUESTION: do we want to merge these?))
85+
8486
```xml
8587
<iq
8688
@@ -89,6 +91,16 @@ Client sends an iq set, optionally including the form. Not including the form is
8991
type='result'>
9092
<joined xmlns="urn:xmpp:gc3:0">
9193
<subscription-jid>[email protected]</subscription-jid>
94+
<x xmlns='jabber:x:data' type='form'>
95+
<field type='hidden'
96+
var='FORM_TYPE'>
97+
<value>urn:xmpp:gc3:member-form</value>
98+
</field>
99+
<field type='text-single'
100+
var='urn:xmpp:gc3:fields:nickname'>
101+
<value>Haggish</value>
102+
</field>
103+
</x>
92104
</joined>
93105
</iq>
94106
```
@@ -234,6 +246,10 @@ If a user's server does not support gc3pam, a client supporting the fallback mec
234246

235247
### Channel roles and affiliations
236248

249+
GC3 uses ACL.md for access control, and hats for roles. Perform Hats/ACL queries against the channel JID.
250+
251+
When dual-stacking with MUC (which it's assumed almost all implementations will), Hats of Owner, Admin, Member should exist to map onto the MUC affiliations.
252+
237253
### Channel configuration
238254

239255
### Inviting to a channel
@@ -242,6 +258,100 @@ If a user's server does not support gc3pam, a client supporting the fallback mec
242258

243259
### Configuring a user's membership of the channel (changing nick, xep4 form)
244260

261+
Users can configure their membership of a room (particularly their nickname, but also whatever else the service exposes).
262+
263+
#### Client requests membership form from channel
264+
265+
A client can the membership configuration form from a channel they're in by sending an iq get
266+
267+
```xml
268+
<iq
269+
from='[email protected]/pda'
270+
id='ia324fih'
271+
272+
type='get'>
273+
<member-form xmlns="urn:xmpp:gc3:0"/>
274+
</iq>
275+
```
276+
277+
The server responds with a form with fields, some of which may be mandatory.
278+
279+
```xml
280+
<iq
281+
282+
id='ia324fih'
283+
284+
type='result'>
285+
<member-form xmlns="urn:xmpp:gc3:0">
286+
<x xmlns='jabber:x:data' type='form'>
287+
<title>Member options</title>
288+
<instructions>Fill out this form to configure your membership</instructions>
289+
<field type='hidden'
290+
var='FORM_TYPE'>
291+
<value>urn:xmpp:gc3:member-form</value>
292+
</field>
293+
<field type='text-single'
294+
label='Nickname'
295+
var='urn:xmpp:gc3:fields:nickname'>
296+
<required/>
297+
</field>
298+
</member-form>
299+
</iq>
300+
```
301+
302+
A field whose var is `urn:xmpp:gc3:fields:nickname` is always the user's nickname in the room, and clients might wish to special-case presentation of this field.
303+
304+
#### Client sends iq to channel with membership details
305+
306+
Client sends an iq set, including the form. Not including a field is an instruction to use the existing value for that field.
307+
308+
```xml
309+
<iq
310+
from='[email protected]/pda'
311+
id='39dhs'
312+
313+
type='set'>
314+
<member-form xmlns="urn:xmpp:gc3:0">
315+
<x xmlns='jabber:x:data' type='form'>
316+
<field type='hidden'
317+
var='FORM_TYPE'>
318+
<value>urn:xmpp:gc3:member-form</value>
319+
</field>
320+
<field type='text-single'
321+
var='urn:xmpp:gc3:fields:nickname'>
322+
<value>Haggish</value>
323+
</field>
324+
</x>
325+
</member-form>
326+
</iq>
327+
```
328+
329+
#### Channel responds with result containing membership details
330+
331+
Like the join response.
332+
333+
```xml
334+
<iq
335+
336+
id='39dhs'
337+
338+
type='result'>
339+
<member-form xmlns="urn:xmpp:gc3:0">
340+
<subscription-jid>[email protected]</subscription-jid>
341+
<x xmlns='jabber:x:data' type='form'>
342+
<field type='hidden'
343+
var='FORM_TYPE'>
344+
<value>urn:xmpp:gc3:member-form</value>
345+
</field>
346+
<field type='text-single'
347+
var='urn:xmpp:gc3:fields:nickname'>
348+
<value>Haggish</value>
349+
</field>
350+
</x>
351+
</member-form>
352+
</iq>
353+
```
354+
245355
### GC3PAM
246356

247357
* Watches outbound GC3 joins

0 commit comments

Comments
 (0)