From 70e38e055e4d24409599b35d51ea960fa4398f9f Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Tue, 9 Jul 2013 09:28:53 -0600 Subject: [PATCH] 0.0.4 --- inbox/chat-markers.xml | 194 +++++++++++++++++++++++++---------------- 1 file changed, 118 insertions(+), 76 deletions(-) diff --git a/inbox/chat-markers.xml b/inbox/chat-markers.xml index 8e00aa6b..b8ca7107 100644 --- a/inbox/chat-markers.xml +++ b/inbox/chat-markers.xml @@ -23,7 +23,6 @@ XMPP Core XEP-0001 - Etc. @@ -34,6 +33,15 @@ im@spencermacdonald.com im@spencermacdonald.com + + 0.0.4 + 2013-07-06 + sdm + +

Noted that Chat Markers is a heuristic solution.

+

Added markable element.

+
+
0.0.3 2013-06-20 @@ -64,22 +72,26 @@ 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. If one or more of the resources is not connected, it can fetch Chat Markers from the Message Archive upon reconnecting.

-

&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" up delivery receipts between resources.

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.

This XEP outlines an efficient message based protocol to provide this functionally using Chat Markers.

+

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.

The term "active chat" refers to a chat that a user is currently active in. See &xep0085;.

The term "system notification" refers to a notification (typically a preview) that is displayed separately to a Chat.

The term "read" in the context of iMessage, Google Hangouts and Blackberry Messenger, directly maps to the displayed element in the Chat Marker namespace.

+

The term "markable message" refers to the stanza for which the original sender would like to receive a Chat Marker.

+

The term "Chat Marker" refers to the stanza by which the recipient replies to a "markable message" with a marker.

+

This document addresses the following requirements:

    +
  1. Enable a client to mark a message as markable.
  2. Enable a client to mark the last received message in a chat.
  3. Enable a client to mark the last displayed message in a chat.
  4. Enable a client to mark the last acknowledged message in a chat.
  5. @@ -87,78 +99,6 @@
- -

Chat Markers use a dedicated protocol extension qualified by the 'urn:xmpp:chat-markers:0' namespace.

-

There are three allowable elements in this namespace (in order of significance):

-
    -
  • received -- the message has been received by a client.
  • -
  • displayed -- the message has been displayed to a user in a active chat and not in a system notification.
  • -
  • acknowledged -- the message has been acknowledged by some user interaction e.g. pressing an acknowledgement button.
  • -
- -

The Chat Marker MUST have an 'id' which is the 'id' of the message being marked.

-

The Chat Marker MUST have a 'thread' if the message has been received, displayed or acknowledged in the context of a thread.

-

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.

- - - - -]]> - -
- - - - -

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.

-
- -

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.

-

If the sender determines that the recipient's client does not support the Chat Markers protocol then it SHOULD NOT send Chat Markers.

-

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.

-
- -

To prevent looping, an entity MUST NOT send a Chat Maker to mark up to a Chat Marker.

-
-
- - -

Clients SHOULD use &xep0280; to support multiple online resources.

-

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.

-

Messages MUST have an 'id' to use Chat Markers.

-

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. -

-
- - - -

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.

-

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.

-
- -

Clients MUST NOT mark a message as acknowledged without any user interaction.

-
- -

Clients MAY mark a sent message, as Chat Markers are inclusive of of both previously sent and received messages.

-
- -

If a delivery receipt is sent to a resource that advertises support, - then a delivery receipt MUST be sent if it is satisfies &xep0184;.

-

If a resource advertises both Chat Maker and Delivery Receipt support it - SHOULD NOT request a receipt.

-
- -

Chat Markers MAY be used alongside Chat States.

-
-
-

If an entity supports the Chat Markers protocol, it MUST report that by including a &xep0030; feature of "urn:xmpp:chat-markers:0" in response to disco#info requests:

@@ -170,7 +110,7 @@ ]]> - + @@ -184,6 +124,99 @@

Support can also be determined via &xep0115;, a.k.a. "caps".

+ + + +

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.

+
+ +

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.

+

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.

+

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.

+
+ +

To prevent looping, an entity MUST NOT send a Chat Maker to mark up to a Chat Marker.

+
+
+ + +

Chat Markers use a dedicated protocol extension qualified by the 'urn:xmpp:chat-markers:0' namespace.

+

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.

+

The 3 other allowable elements in this namespace are used to mark a message (in order of significance):

+
    +
  • received -- the message has been received by a client.
  • +
  • displayed -- the message has been displayed to a user in a active chat and not in a system notification.
  • +
  • acknowledged -- the message has been acknowledged by some user interaction e.g. pressing an acknowledgement button.
  • +
+ +

The Chat Marker MUST have an 'id' which is the 'id' of the message being marked.

+

The Chat Marker MUST have a 'thread' if the message has been received, displayed or acknowledged in the context of a thread.

+

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.

+ + + + sleeping + >My lord, dispatch; read o'er these articles. + + +]]> + + +

Note: A sender MUST include an 'id' attribute on every markable message.

+ +

If recipient does not support the Chat Markers protocol it SHOULD NOT return an error.

+ + + + + +]]> + +

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;.

+
+ + +

Clients SHOULD use &xep0280; to support multiple online resources.

+

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.

+

Messages MUST have an 'id' to use Chat Markers.

+

Messages MUST include the 'markable' element to use Chat Markers.

+

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. +

+

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. +

+
+ + + +

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.

+

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.

+

Only Messages that can be displayed in a chat SHOULD be markable.

+
+ +

Clients MUST NOT mark a message as acknowledged without any user interaction.

+
+ +

Clients MAY mark a sent or received message, as Chat Markers are inclusive of of both previously sent and received messages.

+
+ +

Chat Markers MAY be used alongside Delivery Receipts.

+
+ +

Chat Markers MAY be used alongside Chat States.

+
+
+

A user may not wish to disclose that they have received, displayed or acknowledge a message.

It is possible for a sender to leak its presence when updating Chat Markers; @@ -216,6 +249,15 @@ XEP-XXXX: http://xmpp.org/extensions/xep-XXXX.html + + + + + + + + + @@ -250,7 +292,7 @@ - + ]]>