Skip to main content

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

EnumStateTypeExample
NORMAL0Normal messageHey
FIRST_CONVERSATION1Chatroom first messageTony Stark started this chatroom
MEMBER_JOINED_OPEN_CHATROOM2Member joins open chatroomTony Stark joined this chatroom
MEMBER_LEFT_OPEN_CHATROOM3Member leaves open chatroomTony Stark left this chatroom
MEMBER_ADDED_TO_CHATROOM7Member added in chatroomNick Fury added Tony Stark
MEMBER_LEFT_SECRET_CHATROOM8Member leaves secret chatroomTony Stark left this chatroom
MEMBER_REMOVED_FROM_CHATROOM9Member is removed from a chatroomNick Fury removed Tony Stark
POLL10Poll messageNick Fury created a poll: "Who should lead the Avengers?"
ALL_MEMBERS_ADDED11All members are added in a chatroomNick Fury added all members
TOPIC_CHANGED12Chatroom topic changedNick 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.