ChatLog

ChatLog

The Chat Log application

Constructor

new ChatLog()

Source:
Parameters:
Name Type Description
options.stream Boolean

Render just the chat log for stream view

Members

(static) defaultOptions

Source:

Assign the default options which are supported by this Application

Methods

(static) parse(message) → {Array}

Source:

Parse a chat string to identify the chat command (if any) which was used

Parameters:
Name Type Description
message String

The message to match

Returns:

The identified command and regex match

Type
Array

activateListeners(html)

Source:

Activate event listeners triggered within the ChatLog application

Parameters:
Name Type Description
html jQuery | HTMLElement

deleteAll()

Source:

Delete all messages from the DOM, optionally emitting a signal back to the server to propagate deletion

deleteMessage(messageId)

Source:

Delete a single message from the chat log

Parameters:
Name Type Description
messageId String

The ChatMessage entity to remove from the log

getData() → {Object}

Source:

Prepare the data used to render the ChatLog application

Returns:
Type
Object

notify()

Source:

Trigger a notification that alerts the user visually and audibly that a new chat log message has been posted

(async) postAll() → {Promise}

Source:

If there are any pending messages in the chat log, post them

Returns:

A Promise which resolves once all messages are posted

Type
Promise

(async) postOne(message, notifyopt) → {Promise}

Source:

Post a single chat message to the log

Parameters:
Name Type Attributes Default Description
message ChatMessage

A ChatMessage entity instance to post to the log

notify Boolean <optional>
false

Trigger a notification which shows the log as having a new unread message

Returns:

A Promise which resolves once the message is posted

Type
Promise

updateMessage(message, notify)

Source:

Update the content of a previously posted message after its data has been replaced

Parameters:
Name Type Default Description
message ChatMessage

The ChatMessage instance to update

notify Boolean false

Trigger a notification which shows the log as having a new unread message