From 9d620160e78447a594a7a15c436cd31c47db34bb Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 28 Dec 2015 23:12:14 +0100 Subject: [PATCH] Actually mention in text of the MAM XEP Also fix wrong usage of MESSAGE to IQ, fix example 3 and clarify where the 'complete' attribute is placed. --- xep-0313.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/xep-0313.xml b/xep-0313.xml index a60bb3d0..89fa5826 100644 --- a/xep-0313.xml +++ b/xep-0313.xml @@ -163,7 +163,8 @@ the archive, with a 'query' payload. On receiving the query, the server pushes to the client a series of messages from the archive that match the client's given criteria, and finally returns the &IQ; result to indicate that the query is completed.

-

The final &MESSAGE; response MUST include an RSM <set/> element indicating the +

The final &IQ; result response MUST include an RSM <set/> element, wrapped into a <fin/> + element qualified by the 'urn:xmpp:mam:1' namespace, indicating the UID of the first and last message of the (possibly limited) result set. This allows clients to accurately page through messages.

]]> ]]> + + + + 28482-98726-73623 + 09af3-cc343-b409f + + +]]>

To ensure that the client knows when the results are complete, the server MUST send the &IQ; result after the last message retrieved from the archive. The client can optionally include a 'queryid' attribute in their query, which allows the client to match results to their initiating query.

When querying a pubsub node's archive, the 'node' attribute is added to the <query> element.

]]>

Note: There is no concept of an "open query", and servers MUST be prepared to receive arbitrary page requests at any time.

-

When the results returned by the server are complete (that is: when they are the last page of the result set), the server MUST include a 'complete' attribute in the &IQ; result, with a value of 'true'. 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'.

+

When the results returned by the server are complete (that is: when they are the last page of the result set), the server MUST include a 'complete' attribute in the <fin/> element, with a value of 'true'. 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'.