PrivateMessageRequest

Sends a private chat message.


The private message is dispatched to a specific User, which can be in any server Room, or even in no Room at all. The message is delivered through the SFSEvent.PRIVATE_MESSAGE event, but it is also returned to the sender: this allows showing the messages in the correct order in the application interface. It is also possible to send an optional object together with the message to transmit additional data.

Constructor

new PrivateMessageRequest(message, recipientId, parametersopt)

Creates a new instance of the PrivateMessageRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeAttributesDefaultDescription
messagestringThe message to be sent to the recipient User.
recipientIdnumberThe id of the User to which the message should be sent.
parametersSFSObject<optional>
nullAn object containing additional custom parameters to be sent to the message recipient.