If the method setUserVariables i set the third parameter to false, so I avoid that the event onUserVariablesUpdate is fired and that all users receive the update, I guess I have to manage it all by hand.
I had thought to read the variable, that i can set, in the moment in which the client received response from the server side extension, but does not work.
On the server side extention I have this code (I program in Java):
Code: Select all
HashMap<String, UserVariable> vars = new HashMap<String, UserVariable>();
UserVariable var = new UserVariable("ok");
vars.put("test", var);
helper.setUserVariables(user, vars, false);
// ...code for send message with sendResponse
Code: Select all
sfs.addEventListener(SFSEvent.onExtensionResponse, onExtensionResponse);
// other code and function
private function onExtensionResponse(e:SFSEvent):void
{
/* get the avatar of new joined user */
var user:User = e.params.user;
trace("test value " + user.getVariable("test"));
}
In such events e.params.user is not null?
I tried to set to true and handle the event onUserVariablesUpdate and in this case everything works.
Thank you very much