I’m trying to send an IQ like this:
Fill in this form for xyz
jabber:iq:search
blah blah
I use code similar to the way ‘configure’ works in the room class, but using the SearchExtension rather than the MucOwnerExtension:
var iq:IQ = new IQ( “search.server”, IQ.TYPE_SET, null, success_callback, error_callback );
var searchExtension:SearchExtension = new SearchExtension();
var form:FormExtension = new FormExtension();
var fieldmap:Object = new Object();
form.type = FormExtension.TYPE_SUBMIT;
fieldmap[ “FORM_TYPE” ] = [ SearchExtension.NS ];
form.setFields( fieldmap );
searchExt.addExtension(form);
addExtension(ownerExt);
My IQ gets sent but there is no form anywhere. However, if I change to use the MucOwnerExtension my form does get included in the XML.
I’m convinced it’s to do with the serilaize in SearchExtension - it doesn’t serialize the nodes that are underneath it. When I swap it out with the serialize method in MucBaseExtension, my from is sent correctly…
Bug?
Thanks,
Michael