Skip to main content
Message Privately lets users start a direct 1:1 conversation with a group member from within a group chat. The user long-presses a message, selects “Message Privately”, and the UIKit opens a private conversation with the message sender. Before starting, complete the Getting Started guide.

How It Works

The feature is built into CometChatMessageList. When a user selects “Message Privately” from the message long-press menu:
  1. The UIKit fetches the message sender via CometChat.getUser()
  2. It emits an openChat UI event with { user } via CometChatUIEventHandler
  3. Your app listens with addUIListener and navigates to a private chat screen

Components


Integration Steps

1. Group Chat Screen

Render the full group chat and register an openChat listener. The “Message Privately” option appears automatically in the long-press menu for messages sent by other members of a group conversation — no extra setup needed. When selected, the UIKit fetches the sender and fires openChat, which your listener catches to navigate to the private chat.

2. Private Chat Screen

Create a dedicated screen for the private conversation. Include a back button in the header so the user can return to the group.

3. Navigation Setup

Register both screens in your navigator.

Hiding the Option

The option is already absent in 1:1 conversations, on your own messages, and in AI agent chats — you don’t need to hide it in those cases. Use hideMessagePrivatelyOption when you want to suppress it in a group screen that would otherwise show it — for example a broadcast or announcement group where members shouldn’t DM each other, or a moderated support group where private contact is off-policy.

Feature Matrix


Next Steps

Message List

Full prop reference for CometChatMessageList.

Group Members

Display and manage group member lists.

Message Header

Customize the chat header with back navigation.

All Guides

Browse all feature and formatter guides.