XEP-0437: Room Activity Indicators

Abstract
This specification describes a lightweight mechanism for activity notifications in MUCs
Author
Matthew Wild
Copyright
© 2020 – 2020 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Deferred

WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
Type
Standards Track
Version
0.2.0 (2020-05-05)
Document Lifecycle
  1. Experimental
  2. Deferred
  3. Proposed
  4. Stable
  5. Final

1. Introduction

Sometimes it is desirable for a client to indicate to a user that activity has occurred in a MUC, without the overhead of immediately joining every MUC that the user has an interest in.

A MUC may already send out-of-band notifications to users who are not currently joined if e.g. they are mentioned using References (XEP-0372) [1]. However a MUC typically won't forward other kinds of messages unless the user is joined.

This protocol describes a lightweight mechanism for the client to display an indication to the user that there are new messages in a room since the last time the user was joined there. This can, for example, be used to provide a UI hint that a room the user is interested in has new unread activity.

2. Requirements

This protocol explicitly does not attempt to define:

3. Use Cases

3.1 Client subscribes to activity indicators

To inform the MUC service that you are interested in receiving activity indicators, send a presence to the service including the <rai> element:

Example 1. Client subscribes to activity indicators
<presence to="conference.example.com" id="dwZ3vL">
  <rai xmlns="urn:xmpp:rai:0"/>
</presence>

After sending this presence, the service may send you activity indicator updates at any time, each one containing one or more JIDs of MUC rooms that have new messages:

Example 2. Server notifies client of room activity
<message from="conference.example.com">
  <rai xmlns="urn:xmpp:rai:0">
    <activity>room1@conference.example.com</activity>
    <activity>room3@conference.example.com</activity>
  </rai>
</message>

Note that the service will **only** send notifications for rooms where the client's session is not currently joined. If the client is joined to a room, it already receives live events from the room directly.

3.2 Client unsubscribes from activity indicators

A client may unsubscribe from activity indicators by sending an unavailable presence to the MUC service. This will typically be sent by the user's server automatically when they go offline.

4. Business Rules

Upon receiving a presence stanza addressed to the service JID that includes a <rai xmlns="urn:xmpp:rai:0"> element, the service should build a list of rooms where activity has occurred since the client was last in the room, and send them in a single notification.

When activity happens in a room, a service should send an activity notification to room members who have subscribed to notifications and who have not already received a notification for that room in their current subscription's lifetime.

A server SHOULD only send a single notification for each room where activity has occured since the last time a given affiliated user was joined to a room. Each room may only be notified once, even if many events occur while the client is not present in the room. Therefore the client MUST NOT attempt to count activity events. A single activity notification for a room means some unspecified number of events have happened, receiving another activity notification for the same room adds no further information.

A server MUST NOT send activity notifications to a user from a room that the user would not be allowed to join. This potentially includes hidden rooms where the user has no affiliation.

5. Implementation Notes

5.1 Determining the list of rooms

This specification does not dictate how a server determines which rooms a client should receive notifications for. The list may be large and varying.

For example, this information is available to the server through some other means, or a server may simply subscribe a user to all rooms on the MUC service, or only to rooms where a user has an affiliation.

6. Security Considerations

This specification is not expected to introduce any security concerns.

From a privacy perspective, a user's availability is exposed to the MUC service, but not beyond what would be exposed if the user simply joined a room as normal.

Servers may place restrictions on who may subscribe to room activity notifications, e.g. by only serving local users, or only permitting a sensible number of active subscriptions.

Servers must be careful not to leak room activity indicators to users who would not otherwise have permission to view the content in the room.

7. IANA Considerations

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

8. XMPP Registrar Considerations

This document requires no interaction with XMPP Registrar [4].

9. XML Schema

REQUIRED for protocol specifications.


Appendices

Appendix A: Document Information

Series
XEP
Number
0437
Publisher
XMPP Standards Foundation
Status
Deferred
Type
Standards Track
Version
0.2.0
Last Updated
2020-05-05
Approving Body
XMPP Council
Dependencies
XMPP Core
Supersedes
None
Superseded By
None
Short Name
NOT_YET_ASSIGNED
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Matthew Wild
Email
mwild1@gmail.com
JabberID
me@matthewwild.co.uk

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 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-0372: References <https://xmpp.org/extensions/xep-0372.html>.

2. XEP-0369: Mediated Information eXchange (MIX) <https://xmpp.org/extensions/xep-0369.html>.

3. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

4. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

Appendix H: Revision History

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

  1. Version 0.2.0 (2020-05-05)
    Assign urn:xmpp namespace instead of xmpp:prosody.im namespace (this was missed during acceptance)
    XEP Editor (jsc)
  2. Version 0.1.0 (2020-05-05)
    Accepted by vote of Council on 2020-04-15.
    XEP Editor (jsc)
  3. Version 0.0.1 (2020-04-13)

    First draft.

    mw

Appendix I: Bib(La)TeX Entry

@report{wild2020xep0437,
  title = {Room Activity Indicators},
  author = {Wild, Matthew},
  type = {XEP},
  number = {0437},
  version = {0.2.0},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0437.html},
  date = {2020-04-13/2020-05-05},
}

END