Constructor
# new ChatChannelHelper(chat)
Helper class for chat channels
Parameters:
Name | Type | Description |
---|---|---|
chat |
ChannelState | chat channel |
Example
import { ChatChannelHelper, StateHelper } from "@twilio/flex-ui";
const channelState = StateHelper.getChatChannelStateForTask(task);
const chatChannelHelper = new ChatChannelHelper(channelState);
console.log(chatChannelHelper.lastMessage); // Returns last message object
console.log(chatChannelHelper.typers); // Returns all channel members who are typing
console.log(chatChannelHelper.isCustomerOnline); // Returns true if customer is online
Members
Array.<ChannelsState.MemberState>
# readonly typers
Gets all channel members which are currently typing (except you)