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

XEP-0402: Clarify client behaviour wrt autojoin.

Make it a SHOULD that it joins MUCs on retrieval of autojoin='1'
bookmarks, leaves them on autojoin='0' or no autojoin, and does the same
when it’s the one modifying the bookmarks.
This commit is contained in:
Emmanuel Gil Peyrot 2019-09-28 20:58:31 +02:00
parent 9ab0a67b93
commit c29f2b61a5

View File

@ -144,7 +144,7 @@
</section2>
<section2 topic='Retrieving all bookmarks' anchor='retrieving-bookmarks'>
<p>Once connected, a client SHOULD first retrieve the current list of bookmarks:</p>
<p>Once connected, a client first retrieves the current list of bookmarks. It then SHOULD join every MUC identified by the items 'id' attribute that have an 'autojoin' attribute that is set to "true" or "1".</p>
<p>NOTE: A future version of this specification might refer to &xep0312; or a similar protocol to reduce the need for full synchronisation on each connection.</p>
<example caption='Client retrieves all bookmarks'><![CDATA[
<iq from='juliet@capulet.lit/balcony' type='get' id='retrieve1'>
@ -169,7 +169,7 @@
<item id='orchard@conference.shakespeare.lit'>
<conference xmlns=']]>&namespace;<![CDATA['
name='The Orchard'
autojoin='true'>
autojoin='1'>
<nick>JC</nick>
</conference>
</item>
@ -181,6 +181,7 @@
<section2 topic='Adding a bookmark' anchor='adding-a-bookmark'>
<p>Adding a bookmark means publishing a new item, with the bookmark JID as id, to the '&namespace;' node.</p>
<p>publish-options (as defined in <link url='https://xmpp.org/extensions/xep-0060.xml#publisher-publish-options'>XEP-0060</link>) MUST be supported by the server in order to check that the node is correctly configured before publishing a new conference. This is especially important to avoid leaking your bookmarks to your contacts for instance.</p>
<example caption='Client adds a new bookmark'><![CDATA[
<iq from='juliet@capulet.lit/balcony' type='set' id='pip1'>
@ -244,7 +245,7 @@
<section1 topic="Bookmark Notifications" anchor='notifications'>
<p>When a client is sent an event from the Pubsub service for the '&namespace;' node, it MUST check the 'autojoin' attribute if present, and join the room immediately if the attribute is both present and true.</p>
<p>When a client is sent an event from the Pubsub service for the '&namespace;' node, it SHOULD join the room immediately if the 'autojoin' attribute is both present and true.</p>
<example caption='Client receives a new bookmark notification'><![CDATA[
<message from='juliet@capulet.lit' to='juliet@capulet.lit/balcony' type='headline' id='new-room1'>
@ -262,7 +263,7 @@
</iq>
]]></example>
<p>On the other hand, if the 'autojoin' attribute is absent or false, or when the event is a retract notification, the client MUST leave the room.</p>
<p>On the other hand, if the 'autojoin' attribute is absent or false, or when the event is a retract notification, the client SHOULD leave the room immediately.</p>
<example caption='Client receives a bookmark retraction notification'><![CDATA[
<message from='juliet@capulet.lit' to='juliet@capulet.lit/balcony' type='headline' id='removed-room1'>