ModeratorMessageRequest

Sends a moderator message to a specific User or group of Users.


The current User must have moderation 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.MODERATOR_MESSAGE event.

Constructor

new ModeratorMessageRequest(message, recipientMode, parametersopt)

Creates a new instance of the ModeratorMessageRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeAttributesDefaultDescription
messagestringThe message of the moderator 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.