Merge commit 'refs/pull/663/head' of https://github.com/xsf/xeps

This commit is contained in:
Jonas Wielicki 2018-07-05 16:14:09 +02:00
commit cd9a1c5571
1 changed files with 32 additions and 13 deletions

View File

@ -38,6 +38,15 @@
<shortname>MIX-PRESENCE</shortname>
&ksmithisode;
&skille;
<revision>
<version>0.3.0</version>
<date>2018-06-06</date>
<initials>sek</initials>
<remark><p>
Allow mapped resource in presence;
Remove extraneous vCard checks;
</p></remark>
</revision>
<revision>
<version>0.2.0</version>
<date>2018-06-05</date>
@ -48,7 +57,8 @@
Add vCard routing;
Add mix information to presence;
</p></remark>
</revision><revision>
</revision>
<revision>
<version>0.1.0</version>
<date>2018-05-21</date>
<initials>sek</initials>
@ -63,7 +73,7 @@
</p>
<p>
MIX-CORE shares participant JIDs, which enables messages to be exchange directly.
To facilitate communication between clients IQ stanza messages MAY be routed through a MIX channel. This is needed because many XMPP clients will block IQ stanzas from an unknown JID. Routing IQ stanzas avoids this.
To facilitate communication between clients IQ stanzas MAY be routed through a MIX channel. This is needed because IQ stanzas from an unknown JID may be blocked. Routing IQ stanzas through the channel avoids this.
</p>
</section1>
@ -76,8 +86,8 @@
<li>The mechanism must work cleanly for participants with multiple clients.</li>
<li>Standard presence messages must be used to share presence.</li>
<li>Nick changes should be visible as changes (and not as a new user).</li>
<li>Where &xep0404; (MIX-ANON) is not used, participants must be able to directly contact other participants.</li>
<li>IQ stanzas, including vCard, can be communicated through a channel.</li>
<li>Where &xep0404; (MIX-ANON) is not used, a mechanism is needed so that participants are able to directly contact other participants.</li>
<li>IQ stanzas, including vCard, can be be sent indirectly through a MIX channel.</li>
</ol>
@ -87,7 +97,7 @@
<section2 topic="Participant Information in Presence" anchor="concept-participant-info">
<p>
A MIX channel MAY distribute presence information about channel participants. In order to share JID and Nick information about a participant, this information is encoded in the presence message. This allows full presence information to be shared for each participant without the need for the client to perform any lookup.
A MIX channel implementing this specification MUST be able to distribute presence information about channel participants. In order to share JID and Nick information about a participant, this information is encoded in the presence message. This allows full presence information to be shared for each participant without the need for the client to perform any lookup.
</p>
</section2>
@ -98,13 +108,22 @@
Participants in Presence messages and in IQ messages relayed through a channel are identified by an encoded JID of the form are encoded, using the format "&lt;stable-participant-identifier&gt;#&lt;channel&gt;@&lt;mix domain&gt;". This provides a stable JID for each participant. This JID format is used in three places:
</p>
<ol>
<li>The 'from' of presence stanzas generated by the channel.</li>
<li>The 'to' of IQ stanzas being sent to the channel.</li>
<li>The 'from' of IQ stanzas coming from the channel.</li>
<li>The 'from' of presence stanzas generated by the channel, where the from encodes the Stable Participant ID of the participant to which the presence stanza relates.</li>
<li>The 'to' of IQ stanzas being addresses to a participant and being sent to the channel for indirect communication.</li>
<li>The 'from' of IQ stanzas coming from the channel, to reflect the sending participant where this stanza is being relayed by the channel.</li>
</ol>
<p>
These JIDs will be used to represent specific JID clients. The resource associated with the encoded JID MUST be the resource value from the associated client JID, except where MIX-ANON is followed.
These JIDs will be used to represent specific JID clients. The resource associated with the encoded JID can be either of the follipwing two options:
</p>
<ol>
<li>The resource value from the associated client JID; or</li>
<li>A mapped valued to an anonymized value. This approach MUST be used with MIX-ANON.</li>
</ol>
</section2>
@ -161,7 +180,7 @@
The presence node contains the presence value for clients belonging to participants that choose to publish presence to the channel. A MIX channel MAY require that all participants publish presence, so that active channel participants are visible. It is not possible to enforce this in the server, so participants in a channel with this option MUST publish presence. Each item in the presence node is identified by an encoded JID. The presence is encoded as a standard a presence stanza using a &lt;presence/&gt; element qualified by the 'jabber:client' namespace.
</p>
<p>
MIX extends the &lt;presence&gt; stanza using a &lt;mix&gt; element qualified by the 'urn:xmpp:mix:presence:0' namespace. This enables any receiver of presence to see identify the client to which presence refers and to have a nick to display. This element contains two child elements:
MIX extends the &lt;presence&gt; stanza using a &lt;mix&gt; element qualified by the 'urn:xmpp:mix:presence:0' namespace. This enables any receiver of presence to identify the JID of the client to which the presence presence refers and to have a nick to display. This element contains two child elements:
</p>
<ol>
<li>A &lt;nick&gt; element that contains the Nick of the message sender, taken from the Participants Node. This MUST be present if a Nick is defined for the user.</li>
@ -323,14 +342,14 @@ A user MAY share presence information with the channel, for one or more online c
<section2 topic="Relaying IQ Stanzas" anchor="usecase-iq-relay">
<p>
MIX channels MAY relay IQ stanzas between participants. This is often useful to obtain client information where a direct request to the client would be blocked. When a client sends an IQ stanza through a MIX channel, it will set the 'from' to its own JID and set the 'to' to the encoded JID of the recipient. The MIX channel will modify the JIDs in the outgoing message, so that the 'to' is the full JID of the recipient and the 'from' is the encoded JID of the sender. This is illustrated in the vCard section below.
MIX channels MAY relay IQ stanzas between participants. This is often useful to obtain client information where a direct request to the client would be blocked. When a client sends an IQ stanza through a MIX channel, it will set the 'from' to its own JID and set the 'to' to the encoded JID of the recipient. Participants may be addressed by full JID or bare JID. The MIX channel will modify the JIDs in the outgoing message, so that the 'to' is the full JID of the recipient and the 'from' is the encoded JID of the sender. This is illustrated in the vCard section below.
</p>
</section2>
<section2 topic="Requesting a vCard through a Channel" anchor="usecase-vcard">
<p>A client MAY request the vCard of a channel participant through a MIX channel, for example to get an avatar. The MIX channel MAY pass this request on or MAY block it. vCard requests MAY use &xep0054; (vcard-temp) or &xep0292; (vCard4 over XMPP). The MIX channel does not process the vCard requests, but simply relays them on to real bare JID of the target. A MIX service MAY choose to relay one or both protocols. Where a MIX service relays one or both of these protocols, each protocol relayed MUST be advertised as a feature of the MIX service. In the following example, using vcard-temp, the requesting client sends a message to the encoded JID of the channel participant for which the vCard is desired.</p>
<p>A client MAY request the vCard of a channel participant through a MIX channel, for example to get an avatar. The MIX channel MAY pass this request on or MAY block it. vCard requests MAY use &xep0054; (vcard-temp) or &xep0292; (vCard4 over XMPP). The MIX channel does not process the vCard requests, but simply relays them on to real bare JID of the target. A MIX service MAY choose to relay one or both protocols. In the following example, using vcard-temp, the requesting client sends a message to the encoded JID of the channel participant for which the vCard is desired.</p>
<example caption="Client directly requests vCard through channel" ><![CDATA[
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='lx09df27'
@ -349,7 +368,7 @@ A user MAY share presence information with the channel, for one or more online c
</iq>
]]></example>
<p>
The user's server, on behalf of the user, MAY send a response or reject with an error. The user's server will send the vCard back to the channel.
The user's server, on behalf of the user, MUST send a response or reject with an error. The user's server will send the vCard back to the channel.
</p>
<example caption="User's Server sends vCard Response via MIX channel" ><![CDATA[
<iq from='peter@shakespeare.example'