Global

Methods

# intersection(arr1, arr2)

Compute the intersection of two iterables and return it as a set.

Parameters:
Name Type Description
arr1 Iterable.<*>
arr2 Iterable.<*>
Source:

# toArray(obj)

Normalize an object to an array. If the object is an array, it will be returned, otherwise it will be wrapped with an array.

Parameters:
Name Type Description
obj *
Source:
Returns:

Array

# unique(arr) → {Array}

Remove duplicate values from an array

Parameters:
Name Type Description
arr Array

The array to operate on.

Source:
Returns:

The array with duplicates removed.

Type
Array

Type Definitions

# messageEventDetails

Object passed to details on CustomEvents about messages fired by the Client.

Type:
  • object
Properties
Name Type Description
messageId string

the id of the message the event is referring to

handle string

the handle the event is associated with.

Source:

Events

# message

New Message Event

Called when a new message is available. Call getMessageById to get information about the new message.

Type:
  • CustomEvent
Properties
Name Type Description
detail messageEventDetails

the detail contains a messageEventDetails with the id and handle name of the message which was created.

Source:

# messagedeletion

Delete Message Event. Called when a message is deleted.

When a message is deleted it no longer exists on the server so you cannot call getMessageById to get information about a deleted message.

Type:
  • CustomEvent
Properties
Name Type Description
detail messageEventDetails

the detail contains a messageEventDetails with the id and handle name of the message which was deleted.

Source:

# messageupdate

Update Message Event

Called when a message is updated. For example if the data changes. Use getMessageById to get information about the updatedMessage such as the new data.

Type:
  • CustomEvent
Properties
Name Type Description
detail messageEventDetails

the detail contains a messageEventDetails with the id and handle name of the message which was updated.

Source: