How to use filter state message
The LikeMinds Chat SDK provides users complete flexibility to hide/show certain state messages inside the chatroom.
This guide will help you filter the messages in the Chatroom Screen.
Enums For Conversation State
Enum | State | Type | Example |
---|---|---|---|
NORMAL | 0 | Normal message | Hey |
FIRST_CONVERSATION | 1 | Chatroom first message | Tony Stark started this chatroom |
MEMBER_JOINED_OPEN_CHATROOM | 2 | Member joins open chatroom | Tony Stark joined this chatroom |
MEMBER_LEFT_OPEN_CHATROOM | 3 | Member leaves open chatroom | Tony Stark left this chatroom |
MEMBER_ADDED_TO_CHATROOM | 7 | Member added in chatroom | Nick Fury added Tony Stark |
MEMBER_LEFT_SECRET_CHATROOM | 8 | Member leaves secret chatroom | Tony Stark left this chatroom |
MEMBER_REMOVED_FROM_CHATROOM | 9 | Member is removed from a chatroom | Nick Fury removed Tony Stark |
POLL | 10 | Poll message | Nick Fury created a poll: "Who should lead the Avengers?" |
ALL_MEMBERS_ADDED | 11 | All members are added in a chatroom | Nick Fury added all members |
TOPIC_CHANGED | 12 | Chatroom topic changed | Nick Fury changed current to topic Hey |
You need to pass a list of excluded conversation
as an argument to the initiateLMClient
function.
const excludedConversationState = []; // Conversation State
const lmChatClient = initiateLMClient(excludedConversationState);
Run your Application:
Start your application by running npm run dev
or npm start
in your project's console.