XEP-XXXX: Notification Inbox

This document defines a protocol to manage a notification inbox for pending events.
Valerian Saliou
© 2011 – 2015 XMPP Standards Foundation. SEE LEGAL NOTICES.


WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <https://xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.
Standards Track
0.0.2 (2015-12-09)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Stable
  4. Final

1. Introduction

When interacting with an user, like replying to some comments or adding photo tags, this remote user has no way to get notifications of what happen about him. This specification defines a method for managing such notifications.

2. Requirements

The user who will receive notifications MUST:

In order to get incoming notifications in real-time, the client MAY advertise support for "urn:xmpp:inbox+notify" in its Entity Capabilities (XEP-0115) [1] data.

Clients that provide notifications inbox support MAY request all the "urn:xmpp:inbox" node items on the user's PEP service.

3. Protocol

3.1 Notification types

If the event to notify is listed in the following array, the client MUST consider using the defined event type:

Table 1: Notification types
Type Name Definition
comment The sender replied to some comments.
like The sender liked an item.
quote The sender quoted the user in a post.
wall The sender published an entry on the user's wall.
photo The sender tagged the user in a photo.
video The sender tagged the user in a video.

3.2 Publishing a notification

If Romeo wants to notify all the users who posted a comment in a comment node, his client MUST send a payload to every user's PEP node.

The notification type is stored in the "title" attribute of the "link" element, also containing the URI ("href" attribute) to the target item. The notification text content is stored in the "content" element.

Example 1. Publishing a notification
<iq from='romeo@montague.lit/mobile'
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='urn:xmpp:inbox'>
      <item id='9844f81e1408f6ecb932137d33bed7cfdcf518a3'>
        <entry xmlns='http://www.w3.org/2005/Atom'>
              <name>Romeo Montague</name>
          <content type="text">May I bring my horse?</content>
          <link rel="via" title="comment" href="xmpp:benvolio@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%3A97b64c89747aecbc8077cdab941d92be;item=f3fea3c068f66fee8b66673a6ccd78b6">

3.3 Receiving a notification

Juliet tagged Romeo in a photo. Romeo's client gets pushed of the new item:

Example 2. Receiving a notification
<message to='romeo@montague.lit'
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='urn:xmpp:inbox'>
      <item id='6728ffa81dddf38d375eb3d86e3f70086a41db65'>
        <entry xmlns='http://www.w3.org/2005/Atom'>
              <name>Juliet Capulet</name>
          <content type='text'>Hiking with Romeo</content>
          <link rel="via" title="photo" href="xmpp:juliet@capulet.lit?;node=urn%3Axmpp%3Aalbum%2Fa73933b0408af49f1305cb47a4bb10d7913f0fd0;item=6a18f571bc9b92a442aa80ad2649b0679c8e7b30">

3.4 Removing a notification

Romeo viewed the last notification he received. His client now removes it (as defined in Publish-Subscribe (XEP-0060) [2]):

Example 3. Removing a notification
<iq type='set'
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <retract node='urn:xmpp:notify'>
      <item id='9844f81e1408f6ecb932137d33bed7cfdcf518a3'/>

3.5 Emptying notifications

Romeo wants to clear all the pending notifications. His client purges the "urn:xmpp:inbox" PEP node (as defined in Publish-Subscribe (XEP-0060) [2]):

Example 4. Emptying notifications
<iq type='set'
  <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
    <purge node='urn:xmpp:notify'/>

4. Security Considerations

The client SHOULD check that the author informations (provided in the "author" element) are valid, by checking that the "publisher" item attribute value matches the "uri" element value. If there is a difference, the notification MIGHT NOT be displayed, and the client SHOULD remove it (see the Removing a notification section of this document).

5. XML Schema

This specification re-uses the schema for the Atom content format, i.e., the 'http://www.w3.org/2005/Atom' namespace (see RFC 4287).

6. Acknowledgements

Thanks to Laurent Eschenauer for his initial idea.


Appendix A: Document Information

XMPP Standards Foundation
Standards Track
Last Updated
Approving Body
XMPP Council
Superseded By
Short Name

This document in other formats: XML  PDF

Appendix B: Author Information

Valerian Saliou


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.

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-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.

2. XEP-0060: Publish-Subscribe <https://xmpp.org/extensions/xep-0060.html>.

Appendix H: Revision History

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

  1. Version 0.0.2 (2015-12-09)

    Updated contact information for Valerian Saliou.

    XEP Editor (mam)
  2. Version 0.0.1 (2011-05-06)

    First draft.


Appendix I: Bib(La)TeX Entry

  title = {Notification Inbox},
  author = {Saliou, Valerian},
  type = {XEP},
  number = {XXXX},
  version = {0.0.2},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-XXXX.html},
  date = {2011-05-06/2015-12-09},