powered by Jive Software

MAM-0313 missing and 'id' and 'queryid' attribute in Result packet


#1

@see XEP-0313: Message Archive Management - 4.2 Query results

Missing attributes in element:

  • id - defined as mandatory: “that gives the current message’s archive UID”,
  • queryid - “If the client gave a ‘queryid’ attribute in its initial query, the server MUST also include that in this result element.”

Tested environment:

 Fresh Openfire + plugins build from Github master branch,

 Smack 4.2.0-rc3 client library.

Failure detected with Smack on try query archives -> Exception occurs becauset ‘id’ attribute missing from element.

Smack send ‘queryid’ attribute in query request but that’s not appearing in result: from that reason Smack can’t collect the result in MamQueryResult#forwardedPacket collection.

Java class to fix:

com.reucon.openfire.plugin.archive.xep0313.Result

queryid and id parameters listed in constructor but handling code is missing, for fix - add next next code snippet to constructor:

if (queryId!= null){

element.addAttribute(“queryid”, queryId);

}

element.addAttribute(“id”, id);


#2

Hello Andras_Csete,

Try adding the following codes to the Result class;

public Result(Forwarded forwarded, String xmlns, String queryId, String id) {
super(“result”, xmlns);
element.addAttribute(“queryid”, queryId);
element.addAttribute(“id”, id);
element.add(forwarded.getElement());
}