Interface: IChatSessionService
services.IChatSessionService
Table of contents
Methods
- addAuxiliaryBar
- addPlusButtonAction
- changeMemberSettings
- getBrains
- getMembers
- messages
- onMessageReceived
- onMessageUpdated
- sendMessage
Methods
addAuxiliaryBar
▸ addAuxiliaryBar(auxiliaryBar
, component
): void
Adds a new auxiliary bar to the chat window
Parameters
Name | Type |
---|---|
auxiliaryBar | IAuxiliaryData |
component | ReactNode |
Returns
void
Defined in
addPlusButtonAction
▸ addPlusButtonAction(action
): void
Adds a new action to the plus button menu
Parameters
Name | Type |
---|---|
action | ISubMenuProps |
Returns
void
Defined in
changeMemberSettings
▸ changeMemberSettings(memberId
, settings
): void
Change the settings of a chat member
Parameters
Name | Type | Description |
---|---|---|
memberId | string | The id of the member |
settings | ChatMemberSetting | The new settings (It will only override the settings specified in the object, settings that are not specified will remain the same) |
Returns
void
Defined in
getBrains
▸ getBrains(): IBrainClient
[]
Gets all brains that are in the chat.
Returns
Defined in
getMembers
▸ getMembers(): ChatMember
[]
Gets all the chat members
Returns
Defined in
messages
▸ messages(): Promise
\<ChatMessage
[]>
Gets all the chat messages
Returns
Promise
\<ChatMessage
[]>
Defined in
onMessageReceived
▸ onMessageReceived(callback
): void
Subscribe to onMessageReceived event
Parameters
Name | Type |
---|---|
callback | (message : ChatMessage ) => void |
Returns
void
Defined in
onMessageUpdated
▸ onMessageUpdated(callback
): void
Subscribe to onMessageUpdated event
Parameters
Name | Type |
---|---|
callback | (message : ChatMessage ) => void |
Returns
void
Defined in
sendMessage
▸ sendMessage(options
): Promise
\<boolean
>
Sends a message to the chat.
Parameters
Name | Type | Description |
---|---|---|
options | SendChatMessageOptions | Message options |
Returns
Promise
\<boolean
>
True if the message was sent successfully, false otherwise.