XEP-0333: Displayed Markers (was: Chat Markers)

Abstract
This specification introduces a method to let the sender, or multiple participants in a group chat, know that a client has displayed messages up to a certain point.
Authors
  • Spencer MacDonald
  • Daniel Gultsch
Copyright
© 2013 – 2024 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Experimental

WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.
Type
Standards Track
Version
0.5.0 (2024-03-06)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Stable
  4. Final

1. Introduction

Letting the sender and/or multiple participants of a group chat know that an entity has displayed (Colloquially known as read) a message is a common feature in modern instant messaging.

Message Delivery Receipts (XEP-0184) [1] 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 the message.

This specification defines a protocol for the sender of a message to let the recipient know they are interested in whether the recipient’s client has displayed the message and a protocol for the recipient to respond to said request. In group chats the explicit request is omitted and participants opportunistically share their displayed state with others.

Displayed Markers carry a semantic of all messages up to this point.

Note: Displayed Markers do not mark each individual message, nor do they assume a reliable transport. This means that Displayed Markers can only provide a heuristic solution, but this is often satisfactory for the majority of use cases.

2. Requirements

3. Use Cases

3.1 Requesting Displayed Markers

An entity interested to know if the recipient has displayed a message attaches a <markable/> element qualified by the 'urn:xmpp:chat-markers:0' namespace to the message. The message MUST possess an 'id' attribute for traceability.

Example 1. Romeo sends a message to Juliet
<message to='juliet@capulet.lit' from='romeo@montegue.lit/orchard' id='the-msg-1'>
  <body>Hi. How are you?</body>
  <markable xmlns='urn:xmpp:chat-markers:0'/>
  <request xmlns='urn:xmpp:receipts'/>
</message>

3.2 Sending Displayed Markers

To let the sender know a message has been displayed an entity sends a message with a <displayed/> element qualified by the 'urn:xmpp:chat-markers:0' namespace. The <displayed/> element MUST have an 'id' attribute that copies the value from the 'id' attribute of the message it refers to.

A Displayed Marker MAY be sent to the bare JID of the entity that requested it.

If multiple messages are displayed at once an entity SHOULD only send a <displayed/> marker for the most recent, received message.

To prevent looping, an entity MUST NOT send a Displayed Marker as a response to a Displayed Marker.

Example 2. Juliet lets both Romeo she has displayed the message
<message to='romeo@montegue.lit' from='juliet@capulet.let/balcony'>
   <displayed xmlns='urn:xmpp:chat-markers:0' id='the-msg-1'/>
</message>

3.3 Group Chats

Displayed Markers can be used within group chats to indicate read status of each occupant.

Within the context of a MUC messages are relayed through the MUC's own JID. In a MUC that preserves the 'id' attribute chosen by the sender of the message this 'id' attribute cannot be considered unique, as it may be unintentionally or even maliciously reused by another MUC occupant.

Therefore, if a MUC announces support for Unique and Stable Stanza IDs (XEP-0359) [2] then clients MUST always use the MUC-assigned id for Displayed Markers. The id will be contained in a <stanza-id/> element inserted into the stanza with a 'by' attribute matching the MUC's own JID.

As per XEP-0359 security considerations, if XEP-0359 support is not announced on the MUC room's JID then <stanza-id/> elements with a 'by' attribute that match the MUC's JID should be considered spoofed and MUST be ignored.

In group chats the Displayed Marker MAY be sent opportunistically, meaning without an explicit <markable/> request from the sender. While the sender might not be interested in or have support for Display Markers, other participants of the group chat could be interested in them.

Example 3. Example MUC message with a markable Displayed Marker

<message
    from='coven@chat.shakespeare.lit/firstwitch'
    to='coven@chat.shakespeare.lit'
    id='message-1'
    type='groupchat'>
  <thread>Act IV, Scene I</thread>
  <body>Thrice the brinded cat hath mew'd.</body>
  <markable xmlns='urn:xmpp:chat-markers:0' />
  <stanza-id xmlns='urn:xmpp:sid:0' by='coven@chat.shakespeare.lit' id='39K7ZYIp' />
</message>

Example 4. Example marker response to a markable MUC message

<message
    from='coven@chat.shakespeare.lit/secondwitch'
    to='coven@chat.shakespeare.lit'
    id='message-2'
    type='groupchat'>
  <thread>Act IV, Scene I</thread>
  <displayed xmlns='urn:xmpp:chat-markers:0'
            id='39K7ZYIp'/>
</message>

4. Business Rules

5. Accessibility Considerations

Graphical representations of displayed markers for example in the form of checkmarks need to be made available for visually impaired users.

6. Security Considerations

7. Privacy Considerations

Letting others know that one has displayed (read) a message is not a desirable feature for everyone. Clients SHOULD provide ways to opt-out of this feature.

8. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA).

9. XMPP Registrar Considerations

9.1 Protocol Namespaces

This specification defines the following XML namespace:

10. Design Considerations

Earlier drafts of this specification included <received/> and <acknowledged/> with the same up to this point semantic as the remaining <displayed/>. However in the review phase it was concluded that most implementers prefer the per-message precision of Message Delivery Receipts (XEP-0184) [1] for received tracking. While <displayed/> has been widely implemented during a 10+ year review phase there was seemingly no demand for <acknowledged/>.

11. XML Schema


<?xml version='1.0' encoding='UTF-8'?>

<xs:schema attributeFormDefault="unqualified"
  elementFormDefault="qualified"
  targetNamespace="urn:xmpp:chat-markers:0"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-0333: http://xmpp.org/extensions/xep-0333.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name="markable">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="displayed">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute type="xs:string" name="id"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

</xs:schema>


Appendices

Appendix A: Document Information

Series
XEP
Number
0333
Publisher
XMPP Standards Foundation
Status
Experimental
Type
Standards Track
Version
0.5.0
Last Updated
2024-03-06
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0001
Supersedes
None
Superseded By
None
Short Name
NOT_YET_ASSIGNED
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Spencer MacDonald
Email
im@spencermacdonald.com
JabberID
im@spencermacdonald.com
Daniel Gultsch
Email
daniel@gultsch.de
JabberID
daniel@gultsch.de

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).

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.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. XEP-0184: Message Delivery Receipts <https://xmpp.org/extensions/xep-0184.html>.

2. XEP-0359: Unique and Stable Stanza IDs <https://xmpp.org/extensions/xep-0359.html>.

3. XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.html>.

4. XEP-0313: Message Archive Management <https://xmpp.org/extensions/xep-0313.html>.

5. XEP-0421: Anonymous unique occupant identifiers for MUCs <https://xmpp.org/extensions/xep-0421.html>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 0.5.0 (2024-03-06)
    dg
  2. Version 0.4.1 (2023-07-19)
    Changed discovery example to use client JIDs.
    gdk
  3. Version 0.4 (2020-04-15)
    Add notes about usage within MUCs.
    mw
  4. Version 0.3 (2017-09-11)
    Defer due to lack of activity.
    XEP Editor (jwi)
  5. Version 0.2.1 (2015-10-28)

    Fixing typo ("cannot" repeated twice) (JC Brand).

    XEP Editor (mam)
  6. Version 0.2 (2013-09-05)

    Moved Thread outside of the Chat Marker.

    sdm
  7. Version 0.1 (2013-07-11)

    Initial published version approved by the XMPP Council.

    psa
  8. Version 0.0.4 (2013-07-06)

    Noted that Chat Markers is a heuristic solution.

    Added markable element.

    sdm
  9. Version 0.0.3 (2013-06-20)

    Changed read Chat Marker to displayed.

    Removed stamp from Chat Marker.

    Added thread to Chat Marker.

    Changed namespace to allow for versioning.

    sdm
  10. Version 0.0.2 (2013-06-11)

    Change to a message based protocol.

    sdm
  11. Version 0.0.1 (2013-05-24)

    First draft.

    sdm

Appendix I: Bib(La)TeX Entry

@report{macdonald2013xep0333,
  title = {Displayed Markers (was: Chat Markers)},
  author = {MacDonald, Spencer and Gultsch, Daniel},
  type = {XEP},
  number = {0333},
  version = {0.5.0},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0333.html},
  date = {2013-05-24/2024-03-06},
}

END