diff --git a/inbox/chat-markers.xml b/inbox/chat-markers.xml index 55a4c995..b531e3ab 100644 --- a/inbox/chat-markers.xml +++ b/inbox/chat-markers.xml @@ -34,6 +34,12 @@ im@spencermacdonald.com im@spencermacdonald.com + + 0.0.2 + 2013-06-11 + sdm +

Change to a message based protocol.

+
0.0.1 2013-05-24 @@ -46,15 +52,13 @@ 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 will sync up upon reconnecting to the server.

+ if one of the resources is not connected it can fetch Chat Marker from the Message Archive.

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

-

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 .

-

However, both Delivery Receipts and Chat States are sent as messages without a body element, meaning they will not be archived by &xep0136; or &xep0313;. - This means both the sender and the recipient must be connected at the same time for Chat Markers to propagate correctly.

-

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

+

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.

+

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

@@ -79,498 +83,51 @@
  • read -- the message the user has viewed it in a active chat.
  • acknowledged -- the message has been acknowledged by some user interaction e.g. pressing a button.
  • -

    The Chat Marker MUST have either a 'to' or 'from' attribute with the bare JID of the other contact.

    - -

    The Chat Marker MUST have a 'stamp' which is the timestamp of the Chat Marker. If one isn't supplied the server should set the stamp to the current server time.

    -

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

    -

    The Chat Marker SHOULD have an 'message-stamp' which is the timestamp of the message being marked. This MUST only be set by the server.

    -

    The Chat Marker MUST have a 'room' if it is from a MUC.

    + +

    The Chat Marker MAY have a 'stamp' which is the timestamp of the Chat Marker.

    +

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

    A Chat Marker Indicates that all messages up to and including that message 'id' have been marked.

    - + + + ]]>
    - -

    Messages that are marked as acknowledged are also assumed to be read and received. Messages Marked as read are also assumed to be delivered.

    -

    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.

    -

    All messages MUST have an 'id' to use Chat Markers.

    -

    Clients SHOULD make sure that each message has a unique 'id' so that the can be uniquely identified. - If the server cannot uniquely identify a message by its 'id' it can chose not to add a 'message-stamp' or to add the stamp of the latest message with the matching 'id' for the appropriate chat.

    -
    + - - - - -

    Servers MUST NOT auto subscribe clients to Chat Markers by default, since unmodified clients might be confused by the new protocol. - When a client wants to participate in the Chat Marker Subscription protocol, it sends an IQ set to enable the protocol.

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

    Some clients might want to unsubscribe from Chat Markers. To unsubscribe from Chat Markers, clients send an IQ set:

    - - - - ]]> -

    The server will respond with an IQ result after unsubscribing from Chat Markers:

    - - - - ]]> -
    - - -

    Subscribing or unsubscribing from Chat Marker may fail in the several ways. - If one of these errors is returned, the server MUST keep the previous state, where the initial state is no Chat Marker Subscription. - For example, if the first enable returns an error, the server MUST NOT enable Chat Marker Subscription.

    - -

    The sender has sent a stanza containing XML that does not conform to the appropriate schema or that cannot be processed. - One example is an IQ stanza that includes an unrecognized value of the 'type' attribute. - Another is changing to the state that is already in effect (enabling Chat Marker Subscription a second time).

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

    The sender has sent an subscribe or unsubscribe request to a server - that does not support the protocol. This SHOULD NOT happen in - practice, because clients MUST check for server support before - sending their request.

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

    The sender is forbidden by policy from subscribing or - unsubscribing the resource from Chat Markers.

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

    The receiver does not allow any entity to turn on Chat Marker Subscription. - This might occur in a multi-domain deployment, where - administrators of one domain allow Chat Marker Subscription, but another does - not.

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

    The server will respond with an IQ to say that the Chat Marker has been updated, with the inserted 'message-stamp' if known.

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

    Chat Marker updating may fail in the several ways. If one of these errors is returned, - the server MUST keep the previous Chat Marker.

    - -

    The sender has sent a stanza containing XML that does not conform to the appropriate schema or that cannot be processed. - One example is an IQ stanza that includes an unrecognized value of the 'type' attribute. - Another is a Chat Marker with a latter message message is already in effect.

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

    The sender has sent a Chat Marker update to a server - that does not support the protocol. This SHOULD NOT happen in - practice, because clients MUST check for server support before - sending their request.

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

    The sender is forbidden from updating Chat Markers.

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

    The receiver does not allow any entity to turn on Chat Marker Subscription. - This might occur in a multi-domain deployment, where - administrators of one domain allow Chat Marker Subscription, but another does - not.

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

    A client is able to query for all Chat Markers, optionally - restricting results to those to/from a particular JID and/or time. To allow limiting the results or paging - through them a client may use &xep0059;, which MUST be supported by servers.

    -

    A query consists of an <iq/> stanza addressed to the entity hosting - the Chat Markers, with a 'query' payload. On receiving the query, the server pushes the Chat Markers - that match the client's given criteria.

    -

    Typically you would query for all Chat Markers as soon as you have enabled Chat Marker Subscription.

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

    If a <with/> element is present in the <query/>, it contains a JID against which - to match the Chat Marker. The server MUST only return Chat Markers if they match the supplied JID.

    - - - - - juliet@capulet.com - - - ]]> - - -

    If (and only if) the supplied JID is a bare JID (i.e. no resource is present), then - the server SHOULD return Chat Markers if their bare to/from address would match it. It SHOULD NOT return Chat Markers - from that are from a MUC.

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

    If the <with/> element is present in the <query/> and it is that of a room, - the server MUST only return Chat Markers if they match the supplied JID

    - - - - room@example.net - - - ]]> - - -

    If the jid of a room is supplied, - the server MUST return Chat Markers if their room address would match it.

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

    The <start/> and <end/> elements, if provided, MUST contain timestamps - formatted according to the DateTime profile defined in &xep0082;

    -

    The <start/> element is used to filter out Chat Markers before a certain date/time. - If specified, a server MUST only return Chat Markers whose 'stamp' is equal to or later - than the given timestamp.

    -

    If omitted, the server SHOULD assume the value of <start/> to be equal to the - date/time of the earliest Chat Marker stored in the archive.

    -

    Conversely, the <end/> element is used to exclude from the results Chat Markers - after a certain point in time. If specified, a server MUST only return Chat Markers whose - timestamp is equal to or earlier than the timestamp given in the <end/> element.

    -

    If omitted, the server SHOULD assume the value of <end/> to be equal to the - date/time of the most recent chat Marker stored in the archive.

    - - - 2013-01-01T00:0:01Z - 2013-01-10T00:00:0Z - - - ]]> - -
    - -

    Finally, in order for the client or server to limit the number of results transmitted at - a time a server MUST support &xep0059; and SHOULD support the paging mechanism defined therein. - A client MAY include a <set/> element in its query.

    -

    For the purposes of this protocol, the UIDs used by RSM correspond with the UIDs of the - stanzas stored in the archive.

    - - - - - 10 - - - - ]]> - - -

    To conserve resources, a server MAY place a reasonable limit on how many Chat Markers may be - pushed to a client in one request. If a query returns a number of Chat Markers greater than this - limit and either the client did not specify a limit using RSM then the server should return - a policy-violation error to the client. If the query did include a <set/> element then - the server SHOULD simply return its limited results and adjust the <before/> and <after/> - in its reply to allow the client to page through them by timestamp.

    - - - - - 10 - - - - - Too many results - - - ]]> - -
    + +

    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 updated regardless of the recipients current presence.

    +

    All messages MUST have an 'id' to use Chat Markers.

    - + +

    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.

    +
    +

    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 @@ -583,8 +140,7 @@

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

    -

    Since mobile devices often must pay for network traffic based - on usage, you may wish not to enable Chat Marker Subscription.

    +

    Since mobile devices often must pay for network traffic based on usage, you may wish not to enable Chat Marker Subscription.

    @@ -640,64 +196,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + + + + + + - - + + - - - - - - + + + + + + + + + + + + + + + + + +