AdminMessageRequest

Sends an administrator message to a specific User or group of Users.


The current User must have administration privileges to be able to send the message (see the SFSUser#privilegeId property).

The MessageRecipientMode instance passed to the constructor determines if the message recipient is a single User or all the Users in a Room, a Group or the entire Zone. Upon message delivery, the recipient clients dispatch the SFSEvent.ADMIN_MESSAGE event.

Constructor

new AdminMessageRequest(message, recipientMode, parametersopt)

Creates a new instance of the AdminMessageRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeAttributesDefaultDescription
messagestringThe message of the administrator User to be delivered to the target User/s defined by the `recipientMode` parameter.
recipientModeMessageRecipientModeThe target to which the message should be delivered.
parametersSFSObject<optional>
nullAn object containing custom parameters to be sent to the recipient User/s together with the message.