Skip to main content
“Message Privately” takes someone from a group conversation — or from a profile — straight into a one-to-one chat with them.

Overview

  • In a group chat, the message list’s long-press menu offers Message Privately on messages other people sent.
  • Choosing it fetches the sender and hands you the User. You open your one-to-one chat screen with it.
  • The same screen opens from a profile or a users list — anywhere you hold a User.
  • The conversation appears in Conversations once the first message is sent.

Prerequisites

  • The Kit is set up and a user is logged in — see Getting Started.
  • A one-to-one chat screen: CometChatMessageHeader, CometChatMessageList and CometChatMessageComposer given a User.

Components

Integration Steps

1. Handle Message Privately in the group chat

GroupChatView.swift
Host the header and the composer over the list as Conversation List + Message View shows.
Without onMessagePrivately the option still shows but does nothing — the Kit has no chat screen of its own to open. Hide it if you do not handle it.

2. Open the same chat from a profile or a list

Anywhere you hold a User, push the same screen. From the users list:

3. (Optional) Send a first message

A one-to-one conversation shows in Conversations only once it has a message. To surface it straight away, send one through the Kit, so the open chat and Conversations both update:

Implementation Flow

Customization Options

Hide the option:

Edge Cases

Feature Matrix

Next Steps

Message List

The message menu and its options

New Chat

Start a chat from users and groups

Users

The users list

All Guides

Browse the other guides