ConversationHelper
Helper class for chat conversations
Example:
import { ConversationHelper, StateHelper } from "@twilio/flex-ui";const conversationState = StateHelper.getConversationStateForTask(task);const conversationHelper = new ConversationHelper(conversationState);
console.log(conversationHelper.lastMessage); // Returns last message objectconsole.log(conversationHelper.typers); // Returns all conversation participants who are typingconsole.log(conversationHelper.isCustomerOnline); // Returns true if customer is online
lastMessage: MessageState#
Gets last chat message object
typers: Array<ParticipantState>#
Gets all conversation participants which are currently typing (except you)
isCustomerOnline: boolean#
Returns true if customer is online, false if not
Rate this page