%ents; ]>
Inbox This specification proposes a mechanism by which clients can find a list of ongoing conversations and their state. &LEGALNOTICE; 0430 Deferred Standards Track Standards XMPP Core XEP-0313 inbox &dcridland; 0.2.0 2020-02-03 dwd Updates from the Summit 24 discussion:
  • Remove Marked
  • Metadata in sibling
  • Ensure the last "mam id" is present in metadata, and describe how that can be used.
  • Add options to control unread-only and elide messages.
0.1.0 2020-01-29 XEP Editor (jsc) Accepted by vote of Council on 2020-01-22. 0.0.1 2019-12-30 dwd
  • Initial Revision

When initially run, a messaging client typically shows some list of contacts and chatrooms, and whether any new messages are present in each.

The current mechanism for achieving this UX involves a complete synchronization of the server-side archive, and is both time-consuming and bandwidth-intensive. This specification proposes a solution to directly obtain such data from the server.

Moreover, the information gathered by the server to support this can be used in support of mobile push notifications.

Nomenclature used for instant messages versus ancillary messages will need to be adjusted to make it consistent with &xep0422; et al.

Support for this protocol is advertised by the Service Discovery protocol defined in &xep0030; using a feature of &ns;.

The Inbox consists semantically of a list of conversations in order of last activity. Each conversation is identified by a jid - for group chats this would be the chatroom, and for individual contacts this would be their bare jid.

Each Inbox entry includes a count of messages considered new, the last MAM stanza-id relating to this conversation, and the last MAM result for this conversation, as defined by &xep0313;. In addition, a client-controlled boolean marker can be used to indicate a manual "set unread" state.

Finding more messages from this conversation can be achieved via a MAM query using with to specify the conversation required.

An &IQ; of type "get" is used, containing a single element <inbox/>, containing an optional RSM filter as specified by &xep0059;. This will typically be sent only to the user's own bare jid. If a client requests the inbox without RSM, the server MAY limit the number of conversations arbitrarily by either time or number. This element has a number of attributes:

  • unread-only - Defaults to false. If true, the server will list only conversations with at least one unread message.
  • messages - Defaults to true. If true, the server includes the last message; if false, this is elided.

The server responds with a sequence of &MESSAGE; stanzas, each containing an <entry/> element qualified by the &ns; namespace with a number of attributes:

  • jid - contains the Jid of the conversation for this entry.
  • unread - contains a count of messages which are deemed to be unread by the server. Clients may use this to indicate unread messages to the user.
  • id - contains the last id in the MAM archive for this conversation. Clients may use this as a marker to fetch additional messages (or collated fastenings, see &xep0427;) about the conversation via MAM.

If the messages attribute is missing or set to true, the <entry/> element is followed by the latest instant message, if any, which is encapsulated as a <result/> element as defined by &xep0313;. This contains collated fastenings if supported by the server.

After all entries required have been returned, the server then responds with an &IQ; result containing a <fin/> element qualified by &ns;. This contains the RSM data, a total count of conversation entries within the inbox, a count of conversations with unread messages, and a total count of unread messages.

Servers MUST track which instant messages sent to clients remain unread.

Let us assume a user has only three jids they have exchanged messages with. Asking for their inbox is simple:

]]>

The server responds with a list of conversations:

Greetings from Alpha Centauri! Greetings from Mars! Greetings from Somewhere Else! ]]>

If the id of a conversation has changed, a client might fetch the missing messages and metadata by requesting the MAM archive with the jid of the entry, and after the previous known id for the conversation.

After the list of conversations, the server completes its response with a the reply to the original IQ.

]]>

TODO - Hopefully roughly given by the examples.

TODO

This XEP requires no interaction with &IANA;.

None.

The author notes that this protocol is heavily based on the mod_inbox system of MongooseIM. In addition, Kevin Smith and several others at the XMPP Summit 24 provided useful feedback which has shaped this specification.