Skip to main content
Version: 8.1

ClientMessageBridge class

Level: advanced

Creatio broadcasts messages received via WebSocket to subscribers using the ClientMessageBridge client module schema.

Properties​

LocalStoreName

The name of the repository that stores the message history.

LocalStore Terrasoft.LocalStore

A class instance that implements access to the local storage.

Methods​

init()

Initializes the default value.

saveMessageToHistory(sandboxMessageName, webSocketBody)

Saves the message to the storage if the message has no subscribers and the configuration object indicates that saving is required.

Parameters

sandboxMessageName: String

The message name that Creatio uses while sending the message.

webSocketBody: Object

A message received via WebSocket.

getMessagesFromHistory(sandboxMessageName)

Returns an array of saved messages from repository.

Parameters

sandboxMessageName: String

The message name that Creatio uses while sending the message.

deleteSavedMessages(sandboxMessageName)

Deletes a saved message from repository.

Parameters

sandboxMessageName: String

The message name that Creatio uses while sending the message.