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

1.4rc3: removed presence use case

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2521 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-11-20 22:33:33 +00:00
parent 9585d2fdda
commit 519ec4143f

View File

@ -27,10 +27,10 @@
&temas;
&stpeter;
<revision>
<version>1.4rc2</version>
<date>2008-11-17</date>
<version>1.4rc3</version>
<date>in progress, last updated 2008-11-20</date>
<initials>psa</initials>
<remark><p>Added use case for inclusion of last activity information in presence.</p></remark>
<remark><p>Clarified a few small points in the text; added a reference to XEP-0115.</p></remark>
</revision>
<revision>
<version>1.3</version>
@ -97,7 +97,13 @@
<query xmlns='jabber:iq:last' seconds='903'/>
</iq>
]]></example>
<p>The requesting entity interprets the IQ-result based on the responding entity's JID type in order to determine the meaning of the information. Specifically, the information means something different depending on whether the responding entity is an account registered on an XMPP server (typically with a JID of the form &lt;user@host&gt; a connected or available resource associated with such an account (&lt;user@host/resource&gt; or an "always-on" XMPP server or service (&lt;host&gt; These differences are explained more fully below.</p>
<p>The requesting entity interprets the IQ-result based on the responding entity's JID type in order to determine the meaning of the information. Specifically, the information means something different depending on the identity of the responding entity:</p>
<ol>
<li>An account registered on an XMPP server, with a JID of the form &LOCALBARE;.</li>
<li>A connected or available resource associated with such an account, with a JID of the form &LOCALFULL;.</li>
<li>An "always-on" XMPP server or service, with a JID of the form &DOMAINBARE;.</li>
</ol>
<p>These differences are explained more fully below.</p>
</section1>
<section1 topic='Offline User Query' anchor='offline'>
<p>The primary usage of the 'jabber:iq:last' namespace is to find out how long ago a user logged out (and, additionally, what their status message was at that time). This primary usage assumes that the IQ-get is sent to a bare JID &LOCALBARE;. When used in this way, the &QUERY; element contained in the IQ-result has a 'seconds' attribute, which is the number of seconds that have passed since the user last logged out. In addition, the element MAY contain XML character data that specifies the status message of the last unavailable presence received from the user. An example is shown below:</p>
@ -134,7 +140,7 @@
<p>If the user has at least one connected or available resource when the server receives the request, the response MUST (subject to local security policies) contain an empty &lt;query/&gt; element whose 'seconds' attribute is set to a value of '0'.</p>
</section1>
<section1 topic='Online User Query' anchor='online'>
<p>A requesting entity can send a last activity query to the "full JID" &LOCALFULL; of a connected or available resource associated with an account.</p>
<p>A requesting entity can send a last activity query to the full JID &LOCALFULL; of a connected or available resource associated with an account.</p>
<example caption='Last Activity Query Sent to Full JID'><![CDATA[
<iq from='romeo@montague.net/orchard'
id='last2'
@ -176,27 +182,7 @@
</error>
</iq>
]]></example>
<p>If there is no available resource matching the &lt;user@host/resource&gt; in the 'to' attribute of the request, the server MUST follow the rules in <cite>XMPP IM</cite> in order to determine what error stanza to return.</p>
</section1>
<section1 topic='Inclusion in Presence' anchor='presence'>
<p>An online client MAY include last activity information when sending presence updates. The prototypical use case is including the idle time when automatically setting the user's &SHOW; value to "away" or "xa" (extended away). For example, consider a user who has configured her client to automatically change her presence to "away" after 10 minutes of inactivity. The client could include an iq:last flag to specify how long the user has been idle.</p>
<example caption='Last Indication in Auto-Away'><![CDATA[
<presence from='juliet@capulet.com/balcony'>
<show>away</show>
<query xmlns='jabber:iq:last' seconds='600'/>
</presence>
]]></example>
<p>If one of the user's contacts receives that presence notification with delayed delivery (see &xep0203;) on login in response to a presence probe as described in &xmppim;, the contact will then know how long the user has been idle (i.e., the number of seconds since the delayed delivery timestamp, plus the iq:last seconds). Thus the contact does not need to send an iq:last query.</p>
<example caption='Last Indication in Auto-Away With Delayed Delivery'><![CDATA[
<presence from='juliet@capulet.com/balcony' to='romeo@montague.net'>
<show>away</show>
<query xmlns='jabber:iq:last' seconds='600'/>
<delay xmlns='urn:xmpp:delay'
from='capulet.com'
stamp='2002-09-10T23:41:07Z'/>
</presence>
]]></example>
<p>If no last indication is included in a presence notification, the recipient MUST assume that the idle time is zero.</p>
<p>If there is no available resource matching the &LOCALBARE; in the 'to' attribute of the request, the server MUST follow the rules in <cite>XMPP IM</cite> in order to determine what error stanza to return.</p>
</section1>
<section1 topic='Server and Component Query' anchor='server'>
<p>When the last activity query is sent to a server or component (i.e., to a JID of the form &DOMAINBARE;), the information contained in the IQ reply reflects the uptime of the JID sending the reply. The seconds attribute specifies how long the host has been running since it was last (re-)started. The &QUERY; element SHOULD NOT contain XML character data.</p>
@ -244,7 +230,7 @@
<p>The information contained in an IQ reply for this namespace is inherently ambiguous. Specifically, for a bare JID &LOCALBARE; the information is the time since the JID was last connected to its server; for a full JID &LOCALFULL; the information is the time since the resource was last active in the context of an existing session; and for a bare domain the information is the uptime for the server or component. An application MUST take these differences into account when presenting the information to a human user (if any).</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>A server MUST NOT allow an unauthorized entity to learn a user's network availability by sending a Last Activity request to a JID of the form user@host or user@host/resource, since doing so would constitute a "presence leak" as described in &rfc3920bis;. That is, Last Activity information MAY be divulged only to those entities that have permission to view the user's presence via a presence subscription (potentially as restricted by &xep0016; or &xep0191;).</p>
<p>A server MUST NOT allow an unauthorized entity to learn a user's network availability by sending a Last Activity request to a JID of the form &LOCALBARE; or &LOCALFULL;, since doing so would constitute a "presence leak" as described in &rfc3920bis;. That is, Last Activity information MAY be divulged only to those entities that have permission to view the user's presence via a presence subscription (potentially as restricted by &xep0016; or &xep0191;).</p>
<p>A client MUST provide a way for a human user to disable sending of Last Activity responses from the client's full JID &LOCALFULL;.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>