Message Privately
To message privately from a group chat, LikeMinds React Chat SDK offers a convenient feature that allows you to send private messages within a group chat. This feature enables you to communicate with a specific person privately without others in the group seeing the conversation.
Steps to send message privately in a group
Chatroom
- As soon as a Group Chatroom is opened.
Call
checkDMStatus()
here withrequestFrom=group_channel
to check whether user can reply privately or not.Fetch response from
checkDMStatus()
.- if
response.show_dm
isfalse
- Don’t show Message Privately option on long press/menu option_of individual message.
- else
- Fetch
cta
→route://direct_message?show_list=<>&community_id=<>
from the response and getshow_list
from the query parameter- if
show_list == 1
- Show Message Privately option on long press/menu option of individual message of all members.
- else if
show_list == 2
- Show Message Privately option on long press/menu option of individual message of Community Managers only
- if
- Fetch
- if
note
- Show Message Privately option only when a single message is selected.
- Don't show Message Privately option for self messages.
- Don't show Message Privately option for delete messages.
On click of Message Privately
- Follow steps of create direct messages here