new MessageRecipientMode(mode, target)

Creates a new MessageRecipientMode instance.

The instance must be passed as recipientMode parameter to the ModeratorMessageRequest and AdminMessageRequest classes constructors.

Parameters

Name Type Optional Description

mode

 

 

One of the costants contained in this class, describing the recipient mode.

target

 

 

The moderator/administrator message recipient/s, according to the selected recipient mode.

See also
ModeratorMessageRequest
AdminMessageRequest

Properties

constant static

TO_GROUP  number

The moderator/administrator message will be sent to all the clients who subscribed a specific Room Group.

A Group id must be passed as target parameter to the class constructor.

See also
SFSRoom#groupId
constant static

TO_ROOM  number

The moderator/administrator message will be sent to all the users in a specific Room.

A SFSRoom instance must be passed as target parameter to the class constructor.

See also
SFSRoom
constant static

TO_USER  number

The moderator/administrator message will be sent to a specific user.

A SFSUser instance must be passed as target parameter to the class constructor.

See also
SFSUser
constant static

TO_ZONE  number

The moderator/administrator message will be sent to all the users in the Zone.

null can be passed as target parameter, in fact it will be ignored.

read-only

mode  number

Returns the selected recipient mode.

read-only

target  (SFSUser, SFSRoom, or string)

Returns the moderator/administrator message target, according to the selected recipient mode.