From 8ff8a3b4b22dac1e93407455b5206d607d7fd798 Mon Sep 17 00:00:00 2001
From: Matthew Wild
+
+
Except where explicitly noted below (i.e. 'Limiting results by id'), a query is still considered successful even + if the archive is empty or if no messages match the filter criteria - such queries simply return no results.
+If a 'with' field is present in the form, it contains a JID against which to match messages. The server MUST only return messages if they match the supplied JID. A message in a user's archive matches if the JID matches either the to or from of the message. An item in a MUC archive matches if the publisher of the item matches the JID; note that this should only be available to entities that would already have been allowed to know the publisher of the events (e.g. this could not be used by a visitor to a semi-anonymous MUC).
@@ -803,8 +819,9 @@ ]]> -The server response includes a <metadata/> element containing information about the archive. This element MUST include <start/> and <end/> +
The server response includes a <metadata/> element containing information about the archive. If the archive is not empty, this element MUST include <start/> and <end/> elements, which each have an 'id' and XEP-0082 formatted 'timestamp of the first and last messages in the archive respectively.
+If the archive is empty, the server MUST instead send an empty <metadata/> element.