Quote: “The time in whole seconds of the message relative to the previous message in the collection (or, for the first message, relative to the start of the collection) SHOULD be specified with a ‘secs’ attribute.”
See the example 44. Receiving the first page of a collection
.
<from secs='0'><body>Art thou not Romeo, and a Montague?</body></from>
<to secs='**11**'><body>Neither, fair saint, if either thee dislike.</body></to>
.
[97 more messages]
.
<from secs='**9**'><body>How cam'st thou hither, tell me, and wherefore?</body></from>
.
The “secs” attribute is relative to the previous message, not always to the “start” in the “chat” element.
See **com.reucon.openfire.plugin.archive.xep0136.IQRetrieveHandler **line 96. (Openfire 3.9.3)
See com.reucon.openfire.plugin.archive.xep0136.IQRetrieveHandler
Modify line 71-73 to the following:
for (int i = 0; i < messages.size(); i++) {
if(i == 0){
Modify line 91-92 to the following:
private Element addMessageElement(Element parentElement,
Conversation conversation, ArchivedMessage message, ArchivedMessage previousMessage ) {
Modify line 96 to the following:
if (previousMessage == null) {