XEP-0452: MUC Mention Notifications

Abstract
This specification documents how a user may be informed when they're mentioned in a MUC which they're not currently joined to.
Authors
  • JC Brand
  • Severino Ferrer de la Peñita
  • Matthew Wild
Copyright
© 1999 – 2020 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.2.1 (2021-02-12)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Draft
  4. Final

1. Introduction

The Multi-User Chat (XEP-0045) [1] specification does not provide for a mechanism whereby an user might be informed of being mentioned in a Multi-User Chat (MUC) without being present as an occupant of that MUC.

This XEP aims to provide a standardized way in which this might be achieved.

Concerning "being mentioned" in a MUC, we will rely on References (XEP-0372) [2] as the means whereby someone is explicitly mentioned in a MUC message.

2. Requirements

A user's client must be able to receive forwarded groupchat messages from a MUC in which that user is mentioned, while not having an active session in that MUC (i.e. without joining it).

For this to be possible, the MUC needs to know the user's JID and MUC nickname even when that user is not currently present in the MUC. Multi-User Chat (XEP-0045) [1] section 7.10 ("Registering with a Room") describes a mechanism whereby a user can register a nickname with a MUC and it is recommended that this is the mechanism used to keep track of users across sessions.

Whether or not mesages are forwarded will be determined by a configuration setting on the MUC.

The MUC owner(s) will therefore determine whether notifications are sent out, and if activated, users may opt in or out (or have that done for them by a privileged user) by having their nicknames registered or not with the MUC.

3. Use Cases

3.1 A MUC is configured to send out mention notifications

When an owner creates or configures a MUC, the service offers the option to send out mention notifications to non-present, but still affiliated users:

Example 1. Service Sends Configuration Form
<iq from='coven@chat.shakespeare.lit'
    id='create1'
    to='crone1@shakespeare.lit/desktop'
    type='result'>
  <query xmlns='http://jabber.org/protocol/muc#owner'>
    <x xmlns='jabber:x:data' type='form'>
      <field type='hidden' var='FORM_TYPE'>
        <value>http://jabber.org/protocol/muc#roomconfig</value>
      </field>
      ...
      <field
          label='Forward messages with mentions to non-present, affiiated users'
          type='boolean'
          var='muc#roomconfig_forwardmentions'>
        <value>0</value>
      </field>
      ...
    </x>
  </query>
</iq>

The owner specifies a value of "1" or "true" [3] if the feature is desired:

Example 2. MUC Owner Submits Configuration Form
<iq from='coven@chat.shakespeare.lit'
    id='configure1'
    to='crone1@shakespeare.lit/desktop'
    type='set'>
  <query xmlns='http://jabber.org/protocol/muc#owner'>
    <x xmlns='jabber:x:data' type='submit'>
      <field type='hidden' var='FORM_TYPE'>
        <value>http://jabber.org/protocol/muc#roomconfig</value>
      </field>
      ...
      <field var='muc#roomconfig_forwardmentions'>
        <value>true</value>
      </field>
      ...
    </x>
  </query>
</iq>

3.2 Notifying a non-present user of being mentioned in a MUC

When an affiliated user in a given MUC is referenced in a 'groupchat' message via References (XEP-0372) [2], and the MUC is configured to forward mentions, then the MUC will forward the message stanza to the user.

Example 3. MUC forwards the message to the users client
<message to='hag66@shakespeare.lit' from='coven@chat.shakespeare.lit'>
  <mentions xmlns='urn:xmpp:mmn:0'>
    <forwarded xmlns='urn:xmpp:forward:0'>
      <delay xmlns='urn:xmpp:delay' stamp='2020-12-03T14:45:56Z'/>
      <message type='groupchat' id='ad22c55c-5a20-4185-8735-af2eb8d459a9'
          to='coven@chat.shakespeare.lit'
          from='coven@chat.shakespeare.lit/firstwitch'
          xml:lang='en'>
        <body>secondwitch: Thrice the brinded cat hath mew'd.</body>
        <reference xmlns='urn:xmpp:reference:0'
            type='mention'
            begin='0'
            uri='xmpp:hag66@shakespeare.lit'
            end='11'/>
        <stanza-id xmlns='urn:xmpp:sid:0'
                   id='5f3dbc5e-e1d3-4077-a492-693f3769c7ad'
                   by='coven@chat.shakespeare.lit'/>
      </message>
    </forwarded>
  </mentions>
</message>

Notice that in the example above, the entire original 'groupchat' message (including elements added server-side, like the Unique and Stable Stanza IDs (XEP-0359) [4] stanza-id) is encapsulated inside a Stanza Forwarding (XEP-0297) [5] element.

4. Security Considerations

Similarly to Message Carbons (XEP-0280) [6], the security model assumed by this document is that all of the resources for a single user are in the same trust boundary.

Forwarded groupchat messages leak information of who is currently present in a MUC without requiring the user to join the MUC first to find out.

5. IANA Considerations

None.

6. XMPP Registrar Considerations

6.1 Protocol Namespaces

The XMPP Registrar [7] includes 'urn:xmpp:mmn:0' in its registry of protocol namespaces (see <https://xmpp.org/registrar/namespaces.html>).

6.2 Protocol Versioning

If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.


Appendices

Appendix A: Document Information

Series
XEP
Number
0452
Publisher
XMPP Standards Foundation
Status
Experimental
Type
Standards Track
Version
0.2.1
Last Updated
2021-02-12
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0001, Etc.
Supersedes
None
Superseded By
None
Short Name
NOT_YET_ASSIGNED
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

JC Brand
Email
jc@opkode.com
JabberID
jc@opkode.com
Severino Ferrer de la Peñita
Email
soul@blastersklan.com
JabberID
soul@blastersklan.com
Matthew Wild
Email
mwild1@gmail.com
JabberID
me@matthewwild.co.uk

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 <http://xmpp.org/about/discuss.shtml> 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-0045: Multi-User Chat <https://xmpp.org/extensions/xep-0045.html>.

2. XEP-0372: References <https://xmpp.org/extensions/xep-0372.html>.

3. In accordance with Section 3.2.2.1 of XML Schema Part 2: Datatypes, the allowable lexical representations for the xs:boolean datatype are the strings "0" and "false" for the concept 'false' and the strings "1" and "true" for the concept 'true'; implementations MUST support both styles of lexical representation.

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

5. XEP-0297: Stanza Forwarding <https://xmpp.org/extensions/xep-0297.html>.

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

7. 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 http://xmpp.org/extensions/attic/

  1. Version 0.2.1 (2021-02-12)
    Fix reference to XEP-0297: Stanza Forwarding
    ps
  2. Version 0.2.0 (2021-02-09)
    Require nickname registration for notifications to work
    jcb
  3. Version 0.1.0 (2021-01-26)
    Accepted by vote of Council on 2021-01-06.
    XEP Editor (jsc)
  4. Version 0.0.1 (2020-12-17)

    First draft.

    jcb

END