MessageRecipientMode

Specifies the recipient/s of moderator and administrator messages.

Constructor

new MessageRecipientMode(mode, target)

Creates a new instance of the MessageRecipientMode class.
Pass the instance as the recipientMode parameter of the ModeratorMessageRequest and AdminMessageRequest class constructors.
Parameters:
NameTypeDescription
modenumberOne of the costants of this class, describing the recipient mode.
targetSFSUser | SFSRoom | stringThe moderator/administrator message recipient/s, according to the passed recipient mode.

Members

(readonly) mode :number

Selected recipient mode.
Type:
  • number

(readonly) target :SFSUser|SFSRoom|string

Moderator/administrator message target, according to the selected recipient mode.
Type:

(static, constant) TO_GROUP :number

The moderator/administrator message must be sent to all the clients which subscribed a specific Group.

A Group identifier (name) must be passed as target parameter to the constructor of this class.

Type:
  • number

(static, constant) TO_ROOM :number

The moderator/administrator message must be sent to all Users in a specific Room.

A Room instance must be passed as target parameter to the constructor of this class.

Type:
  • number

(static, constant) TO_USER :number

The moderator/administrator message must be sent to a specific User.

A User instance must be passed as target parameter to the constructor of this class.

Type:
  • number

(static, constant) TO_ZONE :number

The moderator/administrator message must be sent to all Users in the Zone.

A null value can be passed as target parameter to the constructor of this class, in fact it will be ignored.

Type:
  • number