SetBuddyVariablesRequest

Sets one or more Buddy Variables for the User.


This operation updates the SFSBuddy object representing the User in all the Buddy Lists in which the User is present as Buddy. If the operation is successful, the SFSBuddyEvent.BUDDY_VARIABLES_UPDATE event is dispatched to all the owners of those Buddy Lists and to the User which updated its Buddy Variables too.

The Buddy Variables can be persisted, which means that their value will be saved even it the User gets disconnected from the server and they will be restored when it connects again. In order to make a variable persistent, put the SFSBuddyVariable#OFFLINE_PREFIX constant before its name. Read the SmartFoxServer documentaion about the Buddy List API for more information.

This request can be sent if the Buddy List System is already initialized (see the InitBuddyListRequest class description).

Constructor

new SetBuddyVariablesRequest(buddyVariables)

Creates a new instance of the SetBuddyVariablesRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeDescription
buddyVariablesArray.<SFSBuddyVariable>A list of objects representing the Buddy Variables to set.