mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
Presence Changes
This commit is contained in:
parent
69234eea15
commit
91418da01a
100
xep-0403.xml
100
xep-0403.xml
@ -8,7 +8,7 @@
|
||||
<xep>
|
||||
<header>
|
||||
<title>Mediated Information eXchange (MIX): Presence Support.</title>
|
||||
<abstract>This document defines an extension to Mediated Information eXchange (MIX) specified in XEP-0369 to provide presence information for MIX clients to MIX channel participants. </abstract>
|
||||
<abstract>This document defines an extension to Mediated Information eXchange (MIX) specified in XEP-0369 to provide presence information for MIX clients to MIX channel participants. It also specifies relay of IQ stanzas through a MIX channel. </abstract>
|
||||
&LEGALNOTICE;
|
||||
<number>0403</number>
|
||||
<status>Experimental</status>
|
||||
@ -30,6 +30,7 @@
|
||||
<spec>XEP-0313</spec>
|
||||
<spec>XEP-0369</spec>
|
||||
<spec>XEP-0372</spec>
|
||||
<spec>XEP-0404</spec>
|
||||
<spec>XEP-0405</spec>
|
||||
</dependencies>
|
||||
<supersedes/>
|
||||
@ -38,6 +39,16 @@
|
||||
&ksmithisode;
|
||||
&skille;
|
||||
<revision>
|
||||
<version>0.2.0</version>
|
||||
<date>2018-06-05</date>
|
||||
<initials>sek</initials>
|
||||
<remark><p>
|
||||
Change JID Addressing of IQs and Presence;
|
||||
Clarify routing if IQs through channel;
|
||||
Add vCard routing;
|
||||
Add mix information to presence;
|
||||
</p></remark>
|
||||
</revision><revision>
|
||||
<version>0.1.0</version>
|
||||
<date>2018-05-21</date>
|
||||
<initials>sek</initials>
|
||||
@ -50,6 +61,10 @@
|
||||
<section1 topic='Introduction' anchor='intro'>
|
||||
<p>The Mediated Information eXchange (MIX) protocol framework and core capabilities for message distribution are specified in &xep0369; (MIX-CORE). This specification enables presence status of online clients belonging to channel participants to be shared through the channel with participants that wish to see this presence status. This is a achieved by a MIX presence node, which channel participants may subscribe to.
|
||||
</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.
|
||||
</p>
|
||||
|
||||
</section1>
|
||||
|
||||
@ -61,7 +76,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; is not used, participants must be able to directly contact other participants.</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>
|
||||
|
||||
</ol>
|
||||
|
||||
@ -69,24 +85,40 @@
|
||||
|
||||
<section1 topic='Concepts' anchor='concepts'>
|
||||
|
||||
<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.
|
||||
</p>
|
||||
</section2>
|
||||
|
||||
|
||||
|
||||
<section2 topic="Partipant JID Addressing for Presence and IQ relay" anchor="concept-jid-address">
|
||||
<p>
|
||||
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 "<stable-participant-identifier>#<channel>@<mix domain>". 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>
|
||||
</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.
|
||||
</p>
|
||||
</section2>
|
||||
|
||||
|
||||
<section2 topic="User Presence in MIX" anchor="concepts-presence">
|
||||
<p>
|
||||
MIX channels store presence of each online client for a user that chooses to publish presence. Presence is stored in the presence node and is encoded using a full proxy JID. Where a user publishes presence for one or more clients, this information is available to all users subscribing to the channel presence.
|
||||
MIX channels store presence of each online client for a user that chooses to publish presence, in the format that is distributed as presence. Presence is stored in the presence node with an item for each client that is publishing presence. Each item is named with an encoded JID and contains the presence information that is distributed. Where a user publishes presence for one or more clients, this information is available to all users subscribing to the channel presence.
|
||||
</p>
|
||||
<p>
|
||||
A client participating in a MUC channel MAY send it's presences status to the MIX channel using standard presence. The mechanisms to do this are summarized in the next section and standardized in &xep0405;.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The MIX channel will distribute received presence to participants that have subscribed to the participants node. The client to which each presence update refers is identified by the <from> of the presence sent by the MIX channel. This is also the JID stored in the MIX presence node. This JID is built from two components:
|
||||
</p>
|
||||
<ol>
|
||||
<li>The bare proxy JID of the client, as specified in &xep0369;. This encodes channel and a stable random ID in a JID associated with the MIX domain, which enables it to be used for sending presence. </li>
|
||||
<li>The resource taken from the client’s full JID, except when &xep0404; is used, when the resource is hidden.</li>
|
||||
</ol>
|
||||
<p>
|
||||
A client receiving this presence can use information from the channel participant's node to derive the full JID of the client and an associated Nick. When &xep0404; is used to hide JIDs, only the Nick can be derived.
|
||||
The MIX channel will distribute received presence to participants that have subscribed to the participants node. The client to which each presence update refers is identified by the <from> of the presence sent by the MIX channel, using the encoded JID format.
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@ -113,7 +145,7 @@
|
||||
|
||||
|
||||
|
||||
<section2 topic="Presence Node" anchor="prsence-node">
|
||||
<section2 topic="Presence Node" anchor="presence-node">
|
||||
<p>MIX defines one node to support presence, as summarized in the table below. This node is required to support this specification.</p>
|
||||
<table caption="MIX Presence Node">
|
||||
<tr><th>Name</th><th>Node</th><th>Description</th><th>Update</th><th>Distribution</th></tr>
|
||||
@ -126,16 +158,27 @@
|
||||
|
||||
|
||||
<p>
|
||||
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 a JID constructed from the proxy JID and the resource for the client. The presence is encoded as a standard a presence stanza using a <presence/> element qualified by the 'jabber:client' namespace.
|
||||
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 <presence/> element qualified by the 'jabber:client' namespace.
|
||||
</p>
|
||||
<p>
|
||||
MIX extends the <presence> stanza using a <mix> 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:
|
||||
</p>
|
||||
<ol>
|
||||
<li>A <nick> 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>
|
||||
<li>A <jid> element containing the full JID of the client. This MUST be present, unless following the "JID Hidden" model defined in MIX-ANON. If this element is omitted, the <nick> element MUST be present.</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
This node MAY be subscribed to by users using the user's bare JID. So presence of online clients is sent to the user's server for each user subscribed to this node. Presence is always sent using standard presence protocol and MUST NOT be sent using pubsub protocol. Clients MUST NOT directly access the presence node using pubsub. The Presence node is a permanent PubSub node. The following example shows a presence node value for the full JID 'hecate@shakespeare.example/UUID-x4r/2491'.
|
||||
This node MAY be subscribed to by users using the user's bare JID. So presence of online clients is sent to the user's server for each user subscribed to this node. Presence is always sent using standard presence protocol and MUST NOT be sent using pubsub protocol. Clients MUST NOT directly access the presence node using pubsub. The Presence node is a permanent PubSub node. The following example shows a presence node value for the client with full JID 'hecate@shakespeare.example/UUID-x4r/2491'.
|
||||
</p>
|
||||
<example caption="Value of Presence Node"><![CDATA[
|
||||
<items node='urn:xmpp:mix:nodes:presence'>
|
||||
<item id='123456#coven@mix.shakespeare.example/UUID-x4r/2491'>
|
||||
<presence xmlns='jabber:client'>
|
||||
<mix xmlns='urn:xmpp:presence:0'>
|
||||
<jid>hecate@shakespeare.example/UUID-x4r/2491</jid>
|
||||
<nick>thirdwitch</jid>
|
||||
</mix>
|
||||
<show>dnd</show>
|
||||
<status>Making a Brew</status>
|
||||
</presence>
|
||||
@ -191,12 +234,16 @@ A user MAY share presence information with the channel, for one or more online c
|
||||
<show>dnd</show>
|
||||
<status>Making a Brew</status>
|
||||
</presence>]]></example>
|
||||
<p>The user's presence information is then published by the service to the "urn:xmpp:mix:nodes:presence" node. The MIX channel then broadcasts the presence change to all users who are subscribed to the "urn:xmpp:mix:nodes:presence" node. The presence stanza is sent from the full proxy JID of the client updating status.
|
||||
<p>The user's presence information is then published by the service to the "urn:xmpp:mix:nodes:presence" node. The MIX channel then broadcasts the presence change to all users who are subscribed to the "urn:xmpp:mix:nodes:presence" node. The presence stanza 'from' uses an encoded JID.
|
||||
Note that presence is associated with a client and so will have a full JID. The following example shows a presence message as distributed by the server to a presences subscriber.</p>
|
||||
<example caption="Channel Distributes Presence">
|
||||
<![CDATA[<presence from='123435#coven@mix.shakespeare.example/UUID-a1j/7533'
|
||||
<![CDATA[<presence from='123435#coven@mix.shakespeare.example/UUID-a1j/7533'
|
||||
to='hag99@shakespeare.example'
|
||||
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'>
|
||||
<mix xmlns='urn:xmpp:presence:0'>
|
||||
<jid>hecate@shakespeare.example/UUID-x4r/2491</jid>
|
||||
<nick>thirdwitch</jid>
|
||||
</mix>
|
||||
<show>dnd</show>
|
||||
<status>Making a Brew</status>
|
||||
</presence>]]></example>
|
||||
@ -234,13 +281,18 @@ A user MAY share presence information with the channel, for one or more online c
|
||||
from='hag66@shakespeare.example/UUID-a1j/7533'
|
||||
to='coven@mix.shakespeare.example'/>
|
||||
]]></example>
|
||||
<p>The MIX channel will retract (remove) the item in the presence node of the MIX channel identified by the client's full JID. The MIX channel will notify subscribers to the presence node of the user going offline by sending a presence stanza to the full JID of each client. The presence stanza will reference the full proxy JID of the client that is going offline, as shown in the following example:</p>
|
||||
<p>The MIX channel will retract (remove) the item in the presence node of the MIX channel identified by the client's full JID. The MIX channel will notify subscribers to the presence node of the user going offline by sending a presence stanza to the full JID of each client. The presence stanza will use the encoded JID of the client that is going offline, as shown in the following example:</p>
|
||||
|
||||
<example caption="Channel Distributes Notification of Client going Offline">
|
||||
<![CDATA[<presence from='12345#coven@mix.shakespeare.example/UUID-a1j/7533'
|
||||
<![CDATA[<presence from='12345#coven@mix.shakespeare.example/UUID-a1j/7533'
|
||||
to='hecate@shakespeare.example'
|
||||
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
|
||||
type='unavailable'/>]]></example>
|
||||
type='unavailable'>
|
||||
<mix xmlns='urn:xmpp:presence:0'>
|
||||
<jid>hecate@shakespeare.example/UUID-x4r/2491</jid>
|
||||
<nick>thirdwitch</jid>
|
||||
</mix>
|
||||
</presence>]]></example>
|
||||
|
||||
<p>
|
||||
There is the possibility that the message associated with the user going offline will be lost. If this happens, "ghost" entries will appear in the presence node. A MIX service MAY take steps to address this, for example by probing client with a disco for presence items that remain unchanged for a long period.
|
||||
@ -256,11 +308,15 @@ A user MAY share presence information with the channel, for one or more online c
|
||||
</p>
|
||||
|
||||
<example caption="Channel Distributes Notification when User Leaves Channel">
|
||||
<![CDATA[<presence from='12345#coven@mix.shakespeare.example/UUID-a1j/7533'
|
||||
<![CDATA[<presence from='12345#coven@mix.shakespeare.example/UUID-a1j/7533'
|
||||
to='hecate@shakespeare.example'
|
||||
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
|
||||
type='unavailable'/>]]></example>
|
||||
|
||||
type='unavailable'>
|
||||
<mix xmlns='urn:xmpp:presence:0'>
|
||||
<jid>hecate@shakespeare.example/UUID-x4r/2491</jid>
|
||||
<nick>thirdwitch</jid>
|
||||
</mix>
|
||||
</presence>]]></example>
|
||||
|
||||
</section3>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user