mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-27 19:52:18 -05:00
0.0.3
This commit is contained in:
parent
8e4f9a5d82
commit
f3d4862287
@ -7,7 +7,7 @@
|
||||
<xep>
|
||||
<header>
|
||||
<title>Chat Markers</title>
|
||||
<abstract>This specification describes a solution of marking the last received, read and acknowledged message in a chat.</abstract>
|
||||
<abstract>This specification describes a solution of marking the last received, displayed and acknowledged message in a chat.</abstract>
|
||||
<legal>
|
||||
<copyright>This XMPP Extension Protocol is copyright (c) 1999 - 2013 by the XMPP Standards Foundation (XSF).</copyright>
|
||||
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
|
||||
@ -34,6 +34,17 @@
|
||||
<email>im@spencermacdonald.com</email>
|
||||
<jid>im@spencermacdonald.com</jid>
|
||||
</author>
|
||||
<revision>
|
||||
<version>0.0.3</version>
|
||||
<date>2013-06-20</date>
|
||||
<initials>sdm</initials>
|
||||
<remark>
|
||||
<p>Changed read Chat Marker to displayed.</p>
|
||||
<p>Removed stamp from Chat Marker.</p>
|
||||
<p>Added thread to Chat Marker.</p>
|
||||
<p>Changed namespace to allow for versioning.</p>
|
||||
</remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.0.2</version>
|
||||
<date>2013-06-11</date>
|
||||
@ -51,51 +62,52 @@
|
||||
<p>The concept of delivery and read receipts has been popularised by other messaging services such as iMessage, Google Hangouts and Blackberry Messenger.
|
||||
These services provide a visual indication of when a message has been delivered to any of the recipients resources and (optionally) when it has been read.
|
||||
These visual indications (referred to herein as "Chat Markers") are synced between all of the sender's
|
||||
and recipient's resources automatically so the state of a chat is always consistent and
|
||||
if one of the resources is not connected it can fetch Chat Marker from the Message Archive.</p>
|
||||
and recipient's resources automatically, so the state of a chat is always consistent.
|
||||
If one or more of the resources is not connected, it can fetch Chat Markers from the Message Archive upon reconnecting.</p>
|
||||
|
||||
<p>&xep0184; currently provides delivery receipts on a per message basis,
|
||||
but it does not provide any mechanism for the user to indicate that they have read or acknowledged the message.
|
||||
As delivery receipts are sent on a per message basis it would require multiple messages to "sync" up delivery receipts between resources.</p>
|
||||
<p>Moreover by using &xep0085; you could infer that a message has been read if the recipient becomes active at any point after the message has been delivered, but again it would require multiple messages to "sync" up chat states between resources.</p>
|
||||
As delivery receipts are sent on a per message basis it would require multiple messages to "sync up" up delivery receipts between resources.</p>
|
||||
<p>Moreover by using &xep0085; you could infer that a message has been read by the recipient, if they become active at any point after the message has been delivered, but again it would require multiple messages to "sync up" chat states between resources.</p>
|
||||
<p>This XEP outlines an efficient message based protocol to provide this functionally using Chat Markers.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Terminology' anchor='terms'>
|
||||
<p>The acronym "MUC" refers to Multi User Chat as defined in &xep0045;.</p>
|
||||
<p>The term "active chat" refers to a chat that a user is currently active in.</p>
|
||||
<p>The term "active chat" refers to a chat that a user is currently active in. See &xep0085;.</p>
|
||||
<p>The term "system notification" refers to a notification (typically a preview) that is displayed separately to a Chat.</p>
|
||||
<p>The term "read" in the context of iMessage, Google Hangouts and Blackberry Messenger, directly maps to the displayed element in the Chat Marker namespace.</p>
|
||||
</section1>
|
||||
<section1 topic='Requirements' anchor='reqs'>
|
||||
<p>This document addresses the following requirements:</p>
|
||||
<ol>
|
||||
<li>Enable a recipient to mark up to an individual message in a chat as received.</li>
|
||||
<li>Enable a recipient to mark up to an individual message in a chat as read.</li>
|
||||
<li>Enable a recipient to mark up to an individual message in a chat as acknowledged.</li>
|
||||
<li>Enable a entity to update and query Chat Markers regardless of the other entities presence.</li>
|
||||
<li>Enable a client to mark the last received message in a chat.</li>
|
||||
<li>Enable a client to mark the last displayed message in a chat.</li>
|
||||
<li>Enable a client to mark the last acknowledged message in a chat.</li>
|
||||
<li>Enable a client to fetch and set Chat Markers regardless of wether the other users in a chat are online.</li>
|
||||
</ol>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Chat Markers' anchor='chat-markers'>
|
||||
<p>Chat Markers use a dedicated protocol extension qualified by the 'urn:xmpp:chat-markers:tmp' namespace.</p>
|
||||
<p>Chat Markers use a dedicated protocol extension qualified by the 'urn:xmpp:chat-markers:0' namespace.</p>
|
||||
<p>There are three allowable elements in this namespace (in order of significance):</p>
|
||||
<ul>
|
||||
<li>received -- the message has been delivered.</li>
|
||||
<li>read -- the message the user has viewed it in a active chat.</li>
|
||||
<li>acknowledged -- the message has been acknowledged by some user interaction e.g. pressing a button.</li>
|
||||
<li>received -- the message has been received by a client.</li>
|
||||
<li>displayed -- the message has been displayed to a user in a active chat and not in a system notification.</li>
|
||||
<li>acknowledged -- the message has been acknowledged by some user interaction e.g. pressing an acknowledgement button.</li>
|
||||
</ul>
|
||||
|
||||
<p>The Chat Marker MAY have a 'stamp' which is the timestamp of the Chat Marker.</p>
|
||||
<p>The Chat Marker MUST have an 'id' which is the 'id' of the message being marked.</p>
|
||||
<p>A Chat Marker Indicates that all messages up to and including that message 'id' have been marked.</p>
|
||||
<p>The Chat Marker MUST have a 'thread' if the message has been received, displayed or acknowledged in the context of a thread.</p>
|
||||
<p>A Chat Marker Indicates that all messages up to and including that message 'id' have been marked. If a thread is supplied, a Chat Marker is only valid in the context of that thread.</p>
|
||||
<example caption='Example Chat Marker'>
|
||||
<![CDATA[
|
||||
<message
|
||||
from='kingrichard@royalty.england.lit/throne'
|
||||
id='bi29sg183b4v'
|
||||
to='northumberland@shakespeare.lit/westminster'>
|
||||
<received xmlns='urn:xmpp:chat-markers:tmp'
|
||||
<received xmlns='urn:xmpp:chat-markers:0'
|
||||
id='richard2-4.1.247'
|
||||
stamp='2002-10-13T23:58:43Z'/>
|
||||
thread='sleeping'/>
|
||||
</message>
|
||||
]]>
|
||||
</example>
|
||||
@ -111,21 +123,30 @@
|
||||
<p>If the sender determines that the recipient's client does not support the Chat Markers protocol then it SHOULD NOT send Chat Markers.</p>
|
||||
<p>If the sender determines that the recipient's client supports the Chat Markers protocol then it MAY send a Chat Marker to that full JID.</p>
|
||||
</section2>
|
||||
<section2 topic='Ack Messages' anchor='when-ack'>
|
||||
<section2 topic='Chat Marker' anchor='when-chat-marker'>
|
||||
<p>To prevent looping, an entity MUST NOT send a Chat Maker to mark up to a Chat Marker.</p>
|
||||
</section2>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Requirements' anchor='requirements'>
|
||||
<p>Clients SHOULD use &xep0280; to support multiple online resources.</p>
|
||||
<p>Clients SHOULD use &xep0136; or &xep0313; to support offline updating of Chat Markers. Chat Markers SHOULD be archived, so they can be updated regardless of the recipients current presence.</p>
|
||||
<p>All messages MUST have an 'id' to use Chat Markers.</p>
|
||||
<p>Clients SHOULD use &xep0136; or &xep0313; to support offline updating of Chat Markers. Chat Markers SHOULD be archived, so they can be fetched and set regardless of wether the other users in a chat are online.</p>
|
||||
<p>Messages MUST have an 'id' to use Chat Markers.</p>
|
||||
<p>Chat Markers MUST only move forward. If a Chat Maker is received for an earlier message than the current Chat Marker, it MUST be ignored by the client.
|
||||
</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Business Rules' anchor='rules'>
|
||||
<section2 topic='Optimizations' anchor='chatstates'>
|
||||
<p>Less Significant Chat Markers should only be sent if they are later than the more significant Chat Marker i.e. if a Message has been marked as read,
|
||||
a delivered Chat Marker should only be sent if it has a later timestamp than the read Chat Marker.</p>
|
||||
<p>Less Significant Chat Markers SHOULD only be sent if they are later than the more significant Chat Marker i.e. if a Message has been marked as displayed,
|
||||
a received Chat Marker should only be sent if it has a later timestamp than the displayed Chat Marker.</p>
|
||||
<p>To avoid sending redundant Chat Markers while retrieving archived messages, Chat Markers SHOULD only be sent after retrieving the most recent message for a chat.</p>
|
||||
</section2>
|
||||
<section2 topic='Never Auto Acknowledge' anchor='never-auto-acknowledge'>
|
||||
<p>Clients MUST NOT mark a message as acknowledged without any user interaction.</p>
|
||||
</section2>
|
||||
<section2 topic='Marking Sent Messages' anchor='marking-sent-messages'>
|
||||
<p>Clients MAY mark a sent message, as Chat Markers are inclusive of of both previously sent and received messages.</p>
|
||||
</section2>
|
||||
<section2 topic='Interaction with Delivery Receipts' anchor='receipts'>
|
||||
<p>If a delivery receipt is sent to a resource that advertises support,
|
||||
@ -134,40 +155,39 @@
|
||||
SHOULD NOT request a receipt.</p>
|
||||
</section2>
|
||||
<section2 topic='Interaction with Chat States' anchor='chatstates'>
|
||||
<p>Chat Markers can be used alongside Chat States.</p>
|
||||
</section2>
|
||||
<section2 topic='Auto Mark' anchor='auto-responses'>
|
||||
<p>Clients MUST NEVER mark a message as acknowledged without any user interaction.</p>
|
||||
</section2>
|
||||
<section2 topic='Mobile Considerations' anchor='mobile'>
|
||||
<p>Since mobile devices often must pay for network traffic based on usage, you may wish not to enable Chat Marker Subscription.</p>
|
||||
<p>Chat Markers MAY be used alongside Chat States.</p>
|
||||
</section2>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Determining support' anchor='disco'>
|
||||
<p>If an entity supports the Chat Markers protocol, it MUST report that by including a &xep0030;
|
||||
feature of "urn:xmpp:chat-markers:tmp" in response to disco#info requests:</p>
|
||||
<example caption='Client queries for server features'><![CDATA[
|
||||
feature of "urn:xmpp:chat-markers:0" in response to disco#info requests:</p>
|
||||
<example caption='Client queries for server features'>
|
||||
<![CDATA[
|
||||
<iq type='get' id='disco1' to='capulet.lit' from='juliet@capulet.lit/balcony'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
||||
</iq>
|
||||
]]></example>
|
||||
]]>
|
||||
</example>
|
||||
|
||||
<example caption='Server responds with features'><![CDATA[
|
||||
<example caption='Server responds with features'>
|
||||
<![CDATA[
|
||||
<iq type='result' id='disco1' from='capulet.lit' to='juliet@capulet.lit/balcony'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||
...
|
||||
<feature var='urn:xmpp:chat-markers:tmp'/>
|
||||
<feature var='urn:xmpp:chat-markers:0'/>
|
||||
...
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
]]>
|
||||
</example>
|
||||
|
||||
<p>Support can also be determined via &xep0115;, a.k.a. "caps".</p>
|
||||
</section1>
|
||||
<section1 topic='Security Considerations' anchor='security'>
|
||||
<p>A user may not wish to disclose that they have received, read or acknowledge a message.</p>
|
||||
<p>It is possible for a recipient to leak its presence when updating Chat Markers;
|
||||
therefore, a recipient SHOULD NOT return message delivery receipts to senders who are not otherwise authorized to view its presence.</p>
|
||||
<p>A user may not wish to disclose that they have received, displayed or acknowledge a message.</p>
|
||||
<p>It is possible for a sender to leak its presence when updating Chat Markers;
|
||||
therefore, a sender SHOULD NOT send Chat Markers to recipients who are not otherwise authorized to view its presence.</p>
|
||||
</section1>
|
||||
<section1 topic='IANA Considerations' anchor='iana'>
|
||||
<p>This document requires no interaction with the Internet Assigned Numbers Authority (IANA).</p>
|
||||
@ -176,17 +196,18 @@
|
||||
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
|
||||
<p>This specification defines the following XML namespace:</p>
|
||||
<ul>
|
||||
<li>'urn:xmpp:chat-markers:tmp'</li>
|
||||
<li>'urn:xmpp:chat-markers:0'</li>
|
||||
</ul>
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='XML Schema' anchor='schema'>
|
||||
<code><![CDATA[
|
||||
<code>
|
||||
<![CDATA[
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<xs:schema attributeFormDefault="unqualified"
|
||||
elementFormDefault="qualified"
|
||||
targetNamespace="urn:xmpp:chat-markers:tmp"
|
||||
targetNamespace="urn:xmpp:chat-markers:0"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:annotation>
|
||||
@ -201,18 +222,18 @@
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:string" name="id"/>
|
||||
<xs:attribute type="xs:dateTime" name="stamp"/>
|
||||
<xs:attribute type="xs:string" name="thread"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="read">
|
||||
<xs:element name="displayed">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:string" name="id"/>
|
||||
<xs:attribute type="xs:dateTime" name="stamp"/>
|
||||
<xs:attribute type="xs:string" name="thread"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
@ -224,13 +245,14 @@
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:string" name="id"/>
|
||||
<xs:attribute type="xs:dateTime" name="stamp"/>
|
||||
<xs:attribute type="xs:string" name="thread"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
||||
]]></code>
|
||||
]]>
|
||||
</code>
|
||||
</section1>
|
||||
</xep>
|
||||
|
Loading…
Reference in New Issue
Block a user