You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.6 KiB

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<title>Pubsub Message Archive Management</title>
<abstract>This document defines a protocol to query and control a pubsub node's message archive.</abstract>
<type>Standards Track</type>
<spec>XMPP Core</spec>
<initials>XEP Editor (jsc)</initials>
<remark>Accepted by vote of Council on 2020-08-19.</remark>
<p>Split off from XEP-0313 v0.6.3 to ease advancement of that XEP and allow further clarification and expansion of pubsub use cases.</p>
<section1 topic='Introduction' anchor='intro'>
<p>This document specifies how to use &xep0313; in combination with &xep0060; to host and query archives on pubsub nodes.</p>
<section1 topic='Querying a pubsub archive' anchor='querying'>
<p>When querying a pubsub node's archive, the 'node' attribute is added to the &lt;query&gt; element.</p>
<example caption='A user queries a pubsub node&apos;s archive for messages'><![CDATA[
<iq to='pubsub.shakespeare.lit' type='set' id='juliet1'>
<query xmlns='urn:xmpp:mam:2' queryid='f28' node='fdp/submitted/capulet.lit/sonnets'/>
<example caption='Server returns pubsub messages'><![CDATA[
<message id='iasd208' to='juliet@capulet.lit/chamber'>
<result xmlns='urn:xmpp:mam:2' queryid='g28' id='28482-20987-73623'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
<message xmlns="jabber:client">
<event xmlns=''>
<items node='princely_musings'>
<item id='ae890ac52d0df67ed7cfdf51b644e901'>
<entry xmlns=''>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them?
<link rel='alternate' type='text/html'
<section1 topic="Business Rules" anchor='business-rules'>
<p>A PubSub service offering MAM SHOULD store each of the items published to each node. When responding to MAM requests it MUST construct the message stanza within the &lt;forwarded&gt; element in the same manner as the notifications sent to subscribers for the item, except that specifying the 'from' 'to' and 'id' attributes are OPTIONAL. Pubsub items must be returned one per message stanza (i.e. there MUST NOT be multiple &lt;item&gt; elements within the &lt;items&gt; element).</p>