<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
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>
<pclass='box'><em>Note: Chat Markers do not mark each individual message, nor do they assume a reliable transport. This means that Chat Markers can only provide a heuristic solution, but this is often satisfactory for the majority of use cases.</em></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>
<p>Support can also be determined via &xep0115;, a.k.a. "caps".</p>
</section1>
<section1topic='When to send Chat Markers and markable messages'anchor='when'>
<section2topic='Bare JID'anchor='when-bare'>
<p>If the sender knows only the recipient's bare JID, it cannot cannot determine (via &xep0030; or &xep0115;) whether the intended recipient supports the Chat Markers protocol. In this case, the sender MAY send a Chat Marker or markable message.</p>
</section2>
<section2topic='Full JID'anchor='when-full'>
<p>If the sender knows a full JID for the recipient (e.g., via presence), it SHOULD attempt to determine (via service disco or entity capabilities) whether the client at that full JID supports the Chat Markers protocol before attempting to send a Chat Marker or markable message.</p>
<p>If the sender determines that the recipient's client does not support the Chat Markers protocol then it SHOULD NOT send Chat Markers or markable messages.</p>
<p>If the sender determines that the recipient's client supports the Chat Markers protocol then it MAY send a Chat Marker or markable message to that full JID.</p>
<p>There are 4 allowable elements in the namespace, the first 'markable' indicates that a message can be marked with a Chat Marker and is therefore a markable message.</p>
<p>The 3 other allowable elements in this namespace are used to mark a message (in order of significance):</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>
<p>When the recipient sends a Chat Marker, it SHOULD ensure that the message stanza contains only the Chat Marker child element. Naturally, intermediate entities might add other extension elements to the message when routing or delivering the receipt message, e.g., a <delay/> element as specified in &xep0203;.</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>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>Chat Markers for unknown messages MUST be ignored by the client. A client MAY store the Chat Marker incase the associated message is retrieved later.
<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>