1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-21 23:28:51 -05:00

Modify Prefernces to use XEP-0004

This commit is contained in:
Steve Kille 2016-09-30 16:01:04 +01:00
parent 81ccf5017c
commit d33831d148

View File

@ -44,7 +44,7 @@
<version>0.4</version>
<date>2016-09-21</date>
<initials>sek</initials>
<remark><p>Clarification of MIX Proxy concept; Clarify node definitions; Make all nodes optional; Merge ACL node into configuration node; Add information node including avatar; Resolve 4.1 question by accepting provisional answer; Add discovery examples; setting and sharing Subject; Protocol to request channel information and participants; vCard Request; Private Messages </p></remark>
<remark><p>Clarification of MIX Proxy concept; Clarify node definitions; Make all nodes optional; Merge ACL node into configuration node; Add information node including avatar; Resolve 4.1 question by accepting provisional answer; Add discovery examples; setting and sharing Subject; Protocol to request channel information and participants; vCard Request; Private Messages; Set user preferences with XEP-0004</p></remark>
</revision>
<revision>
<version>0.3.1</version>
@ -754,17 +754,24 @@
<tr><td>'vCard'</td><td>'Allow', 'Block'</td> <td>'Block'</td></tr>
</table>
<p>When joining a channel, the client may specify one or more preference options. In the response, the server MUST specify all of the user preferences supported by the server, with default values if the user has not requested a different value. The following example shows joining a channel and setting a preference.</p>
<p>When joining a channel, the client may specify one or more preference options as a &xep0004; form. In the response, the server MUST specify all of the user preferences supported by the server, with default values if the user has not requested a different value. The following example shows joining a channel and setting a preference.</p>
<example caption="User Joins a Channel and Specifies a preference"><![CDATA[
<iq type='set'
from='hag66@shakespeare.example'
to='coven@mix.shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<join xmlns='urn:xmpp:mix:0'>
<join xmlns='urn:xmpp:mix:0'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<subscribe node='urn:xmpp:mix:nodes:presence'/>
<user-preference key='JID Visibility' value='Never Show JID'/>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>urn:xmpp:mix:0</value>
</field>
<field var='JID Visibility'>
<value>Never Show JID</value>
</field>
</x>
</join>
</iq>
]]></example>
@ -777,13 +784,55 @@
<join xmlns='urn:xmpp:mix:0' jid='hag66@shakespeare.example'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<subscribe node='urn:xmpp:mix:nodes:presence'/>
<user-preference key='JID Visibility' value='Never Show JID'/>
<user-preference key='Private Messages' value='Allow'/>
<user-preference key='vCard' value='Block'/>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>urn:xmpp:mix:0</value>
</field>
<field var='JID Visibility'>
<value>Never Show JID</value>
</field>
<field var='Private Messages'>
<value>Allow</value>
</field>
<field var='vCard'>
<value>Block</value>
</field>
</x>
</join>
</iq>
]]></example>
<p>The client may also query the channel in order to find out which user preferences are supported and the options available. This will allow users to set options not specified in the standard. The result is a form template.</p>
<example caption="User Requests and Recieves Preferences Template Form"><![CDATA[
<iq type='get'
from='hag66@shakespeare.example'
to='coven@mix.shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<get-preference-template xmlns='urn:xmpp:mix:0'/>
</iq>
<iq type='result'
from='coven@mix.shakespeare.example'
to='hag66@shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<get-preference-template xmlns='urn:xmpp:mix:0'>
<x xmlns='jabber:x:data' type='form'>
<field var='FORM_TYPE' type='hidden'>
<value>urn:xmpp:mix:0</value>
</field>
<field type='list-single' label='Preference for JID Visibility' var='JID Visibility'>
<option label='JID Never Shown'><value>Never Show JID</value></option>
<option label='Default Behaviour'><value>Use Channel Default</value></option>
<option label='Try not to show JID'><value>Prefer Not Show JID</value></option>
</field>
<field type='list-single' label='Example Custom Preference' var='Custom Preference'>
<option label='One Option'><value>A</value></option>
<option label='Another Option'><value>B</value></option>
</field>
</x>
</get-preference-template>
</iq>
]]></example>
</section3>