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

number

 

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

target

(SFSUser, SFSRoom, or string)

 

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

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.