- Contents
Interaction Scripter Developer's Guide
ChatObject.messages Property
Definition
The messages property of the chatObject returns an array of messages of that chat interaction after the chatObject had been initialized. The SubObjectChangeHandler can be an assigned callback that gets alerted with new messages when the chat Interaction receives new messages.
Compatibility
This functionality is only available with scripts for Interaction Connect. It is not available in Scripter .Net client.
Syntax
function chatInitialized(){
if(chatObject.messages !== undefined)
{ renderChatBox(chatObject.messages); chatObject.SubObjectChangeHandler = messagesChanged; }
}
function messagesChanged()
{ renderChatBox(chatObject.messages); }
Each message is an object with the following properties:
chatMember.displayName
chatMember.chatMemberType
chatMember.interactionId
chatMember.userId
messageType
text
timestamp