powered by Jive Software

Room configuration problem


#1

Hello there,

Xiff 3.1.0

OpenFire 3.7.1

SDK 4.7

If i understood well , the way to configure a MUC room is asynchronous using the RoomEvent.CONFIGURE_ROOM.

Here is the callbackcode I use :

private function onConfigureRoom( event:RoomEvent ):void { var _formExtension:FormExtension = event.data as FormExtension; var _formField:FormField; _formField=_formExtension.getFormField(“muc#roomconfig_maxusers”); _formField.value=null; // to remove the value tag _formField.value=“15”; appModel.curGame.room.configure( formExtension ); }

It seems that the _formField.value=null which triggers the XMLStanza.as --> setField --> RemoveFields does not work because of a problem with the following line in RemoveFields :

while ( xml.children().(localName() == name).length() > 0 )

with name instantianted with ‘value’.

the lenght remain to 0, the tag ‘value’ is never delete.

The new value is added in the value array a with a 1 index.(the old value remains at the 0 index).

The new value is not taken into account by OpenFire.

I had to create my own removeFieldValue function , and it works now.

public function removeFieldValue( field:FormField ):void { for (var i:int=0;i < field.xml.children().length();i++) { if ( field.xml.children()[i].localName() == “value” ) { delete field.xml.children()[i]; }//if }//for }//removeFieldValue

Is it a bug or a configuration problem ?

Thank in advance

LaNenet