Unread Messages Plugin
Adds the ability to count unread messages in a ChatEngine Chat
Quick Start
- Have ChatEngine instantiated and connected, and have a channel you want to count unread messages on
const ChatEngine = ChatEngineCore; ChatEngine;ChatEngine;
- Attach this plugin to the channel you want, in this case global
ChatEngineglobal;
- The plugin needs to be notified when the user is considered active or inactive to properly count messages
// sets unreadCount to 0, stops counting unread messages and stops emitting eventsChatEngineglobalunreadMessages;
// starts counting unread messages and starts emitting events - default stateChatEngineglobalunreadMessages;
- Listen for the
$unread
events that emit whenever your channel recieves a message while it is marked as inactive
ChatEngineglobal;
Support
- If you need help, have a general question a feature request or to file a bug, contact support@pubnub.com