Methods
sendMessage(messageText, optionsopt, serverMessageObjectopt, clientMessageObjectopt)
#
Send message to bot including rendering
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
messageText |
String | message text to send |
||||||||||||||||
options |
Object |
<optional> |
additional options Properties
|
|||||||||||||||
serverMessageObject |
Object |
<optional> |
overrides the properties of message object before sending to websocket Properties
|
|||||||||||||||
clientMessageObject |
Object |
<optional> |
overrides the properties of message object before sending to UI renderMessage method Properties
|
- Source:
Events
afterRenderMessage
afterRenderMessage will be triggered after appending the message html to chatwindow
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
messageHtml |
Object | message bubble html content |
msgData |
Object | message data |
chatWindowEvent |
Object |
- Source:
beforeRenderMessage
beforeRenderMessage will be triggered before appending the message html to chatwindow
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
messageHtml |
Object | message bubble html content |
msgData |
Object | message data |
chatWindowEvent |
Object |
- Source:
beforeViewInit
beforeViewInit will be triggered before the chat window dom element is attached to provided container.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
chatEle |
Object | chat window dom element . |
chatWindowEvent |
Object |
- Source:
beforeWSSendMessage
onWSMessage will be triggered on new message received from websocket
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
messageToBot |
Object | message data to be sent to to websocket |
chatWindowEvent |
Object |
- Source:
jwtSuccess
jwtSuccess will be triggered once the jwt token received from API.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
jwt |
String | jwt token from server response . |
- Source:
onChatHistoryResponse
onChatHistoryResponse will be triggered on chatHistory API response
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
historyResponse |
Object | chatHistory API response |
chatWindowEvent |
Object |
- Source:
onKeyDownEvent
onKeyDownEvent will be triggered on Keydown Event
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
keyDownEvent |
Object | |
chatWindowEvent |
Object |
- Source:
onWSMessage
onWSMessage will be triggered on new message received from websocket
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
messageData |
Object | message data received from websocket |
chatWindowEvent |
Object |
- Source:
onWSOpen
onWSOpen will be triggered on new websocket connection open
- Source:
viewInit
viewInit will be triggered once the chat window dom element is attached to provided container.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
chatEle |
Object | chat window dom element . |
chatWindowEvent |
Object |
- Source: