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.
This protocol explicitly does not attempt to define:
To inform the MUC service that you are interested in receiving activity indicators, send a presence to the service including the <rai> element:
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:
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.
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.
Upon receiving a presence stanza addressed to the service JID that includes a <rai xmlns="xmpp:prosody.im/protocol/rai"> 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.
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.
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.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [3].
This document requires no interaction with XMPP Registrar [4].
REQUIRED for protocol specifications.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).
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.
## 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. ##
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.
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).
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.
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.
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>.
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".
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/>.
Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/
First draft.
@report{wild2020xepxxxx, title = {Room Activity Indicators}, author = {Wild, Matthew}, type = {XEP}, number = {xxxx}, version = {0.0.1}, institution = {XMPP Standards Foundation}, url = {https://xmpp.org/extensions/xep-xxxx.html}, date = {2020-04-13/2020-04-13}, }
END