Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XEP-0313: Fix MUC archive example #1321

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 58 additions & 44 deletions xep-0313.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
</schemaloc>
&mwild;
&ksmith;
<revision>
<version>1.1.2</version>
<date>2024-09-18</date>
<initials>egp</initials>
<remark>
<ul>
<li>Fix JID and affiliation of the first two witches in the MUC example.</li>
<li>Fix duplicated 'id' in MUC example.</li>
<li>Fix indentation in examples.</li>
</ul>
</remark>
</revision>
<revision>
<version>1.1.1</version>
<date>2024-02-20</date>
Expand Down Expand Up @@ -321,7 +333,9 @@
from='[email protected]/orchard'
type='chat'>
<body>Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.</body>
<stanza-id xmlns='urn:xmpp:sid:0' by='[email protected]' id='28482-98726-73623' />
<stanza-id xmlns='urn:xmpp:sid:0'
by='[email protected]'
id='28482-98726-73623' />
</message>]]></example>
<p>Note: Previous versions of this protocol did not specify any interaction with stanza-id, and clients MUST NOT interpret XEP-0359 IDs in messages as archive IDs unless the server advertises support for 'urn:xmpp:mam:2' specifically.</p>
</section2>
Expand Down Expand Up @@ -644,9 +658,9 @@
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
<message xmlns='jabber:client'
to='[email protected]/balcony'
from='[email protected]/orchard'
type='chat'>
to='[email protected]/balcony'
from='[email protected]/orchard'
type='chat'>
<body>Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.</body>
</message>
</forwarded>
Expand All @@ -658,9 +672,9 @@
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:09:32Z'/>
<message xmlns='jabber:client'
to='[email protected]/orchard'
from='[email protected]/balcony'
type='chat' id='8a54s'>
to='[email protected]/orchard'
from='[email protected]/balcony'
type='chat' id='8a54s'>
<body>What man art thou that thus bescreen'd in night so stumblest on my counsel?</body>
</message>
</forwarded>
Expand Down Expand Up @@ -724,14 +738,14 @@
<example caption='A page query using Result Set Management'><![CDATA[
<iq type='set' id='q29303'>
<query xmlns='urn:xmpp:mam:2'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'><value>urn:xmpp:mam:2</value></field>
<field var='start'><value>2010-08-07T00:00:00Z</value></field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>10</max>
<after>09af3-cc343-b409f</after>
</set>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'><value>urn:xmpp:mam:2</value></field>
<field var='start'><value>2010-08-07T00:00:00Z</value></field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>10</max>
<after>09af3-cc343-b409f</after>
</set>
</query>
</iq>
]]></example>
Expand All @@ -742,7 +756,7 @@
<iq type='error' id='q29303'>
<error type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</error>
</iq>
]]></example>
<p>When the results returned by the server are complete (that is: when they have not been limited by the maximum size of the result page (either as specified or enforced by the server)), the server MUST include a 'complete' attribute on the &lt;fin&gt; element, with a value of 'true'; this informs the client that it doesn't need to perform further paging to retreive the requested data. If it is not the last page of the result set, the server MUST either omit the 'complete' attribute, or give it a value of 'false'.</p>
Expand All @@ -765,14 +779,14 @@
<example caption='A request for the last page in an archive'><![CDATA[
<iq type='set' id='q29303'>
<query xmlns='urn:xmpp:mam:2'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'><value>urn:xmpp:mam:2</value></field>
<field var='start'><value>2010-08-07T00:00:00Z</value></field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>10</max>
<before/>
</set>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'><value>urn:xmpp:mam:2</value></field>
<field var='start'><value>2010-08-07T00:00:00Z</value></field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>10</max>
<before/>
</set>
</query>
</iq>
]]></example>
Expand All @@ -786,15 +800,15 @@
<example caption='Requesting a page that is flipped'><![CDATA[
<iq type='set' id='q29309'>
<query xmlns='urn:xmpp:mam:2'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'><value>urn:xmpp:mam:2</value></field>
<field var='start'><value>2010-08-07T00:00:00Z</value></field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>10</max>
<after>09af3-cc343-b409f</after>
</set>
<flip-page/>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'><value>urn:xmpp:mam:2</value></field>
<field var='start'><value>2010-08-07T00:00:00Z</value></field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>10</max>
<after>09af3-cc343-b409f</after>
</set>
<flip-page/>
</query>
</iq>
]]></example>
Expand Down Expand Up @@ -853,17 +867,17 @@
<p>In the case of non-anonymous rooms or if the recipient of the MUC archive has the right to access the sender real JID at the time of the query, the archive message will use extended message information in an &lt;x/&gt; element qualified by the 'http://jabber.org/protocol/muc#user' namespace and containing an &lt;item/&gt; child with a 'jid' attribute specifying the occupant's full JID, as defined for non-anonymous room presence in &xep0045;. The archiving entity MUST strip any pre-existing &lt;x&gt; element from MUC messages (as MUC rooms are not required to do this).</p>
<example caption='Server returns MUC messages'><![CDATA[
<message id='iasd207' from='[email protected]' to='[email protected]/pda'>
<result xmlns='urn:xmpp:mam:2' queryid='g27' id='34482-21985-73620'>
<result xmlns='urn:xmpp:mam:2' queryid='g27' id='78527-06716-51603'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2002-10-13T23:58:37Z'/>
<message xmlns="jabber:client"
from='[email protected]/firstwitch'
id='162BEBB1-F6DB-4D9A-9BD8-CFDCC801A0B2'
type='groupchat'>
from='[email protected]/firstwitch'
id='162BEBB1-F6DB-4D9A-9BD8-CFDCC801A0B2'
type='groupchat'>
<body>Thrice the brinded cat hath mew'd.</body>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none'
jid='witch1@shakespeare.lit'
<item affiliation='owner'
jid='crone1@shakespeare.lit'
role='participant' />
</x>
</message>
Expand All @@ -876,13 +890,13 @@
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2002-10-13T23:58:43Z'/>
<message xmlns="jabber:client"
from='[email protected]/secondwitch'
id='90057840-30FD-4141-AA44-103EEDF218FC'
type='groupchat'>
from='[email protected]/secondwitch'
id='90057840-30FD-4141-AA44-103EEDF218FC'
type='groupchat'>
<body>Thrice and once the hedge-pig whined.</body>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none'
jid='witch2@shakespeare.lit'
<item affiliation='admin'
jid='wiccarocks@shakespeare.lit'
role='participant' />
</x>
</message>
Expand Down