ChatLog

ChatLog

The Chat Log application displayed in the Sidebar

Constructor

new ChatLog()

Source:
See:

Extends

Members

(static) defaultOptions

Source:

_original :SidebarTab

Source:
Overrides:

Denote whether or not this is the original version of the sidebar tab, or a pop-out variant

Type:

collection :Messages

Source:

A reference to the Messages collection that the chat log displays

Type:

tabName :string

Source:
Overrides:

The base name of this sidebar tab

Type:
  • string

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

_onLazyLoadImage(entries, observer)

Source:
Overrides:

Handle lazy loading for sidebar images to only load them once they become observed

Parameters:
Name Type Description
entries
observer

(async) _render()

Source:
Overrides:

(async) _renderInner()

Source:
Inherited From:

activate()

Source:
Overrides:

Activate this SidebarTab, switching focus to it

activateListeners(html)

Source:

Activate event listeners triggered within the ChatLog application

Parameters:
Name Type Description
html jQuery | HTMLElement

(async) close()

Source:
Inherited From:

createPopout() → {SidebarTab}

Source:
Overrides:

Create a second instance of this SidebarTab class which represents a singleton popped-out container

Returns:

The popped out sidebar tab instance

Type
SidebarTab

deleteAll()

Source:

Delete all message HTML from the log

deleteMessage(messageId, deleteAllopt)

Source:

Delete a single message from the chat log

Parameters:
Name Type Attributes Description
messageId string

The ChatMessage entity to remove from the log

deleteAll boolean <optional>

Is this part of a flush operation to delete all messages?

getData()

Source:

notify()

Source:

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

(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

renderPopout()

Source:
Overrides:

Render the SidebarTab as a pop-out container

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