Namespace

Notifications

Notifications

Members

# static NewChatMessage

Notification shown when new chat message is received It renders title as Strings.NewChatMessageNotificationTitle and body as Strings.NewChatMessageNotificationBody
Properties:
Name Type Description
payload Object
lastMessage ChatMessageHelper last message object
Example
import { Notifications, NotificationIds, StateHelper, ChatChannelHelper } from "@twilio/flex-ui";
const channelState = StateHelper.getChatChannelStateForTask(task);
const chatChannelHelper = new ChatChannelHelper(channelState);

Notifications.showNotification(NotificationIds.NewChatMessage, {
 lastMessage: chatChannelHelper.lastMessage
});