AI Integration Quick Reference
AI Integration Quick Reference
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,CometChatMessageListandCometChatMessageComposergiven aUser.
Components
Integration Steps
1. Handle Message Privately in the group chat
- SwiftUI
- UIKit
GroupChatView.swift
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 aUser, push the same screen. From the users list:
- SwiftUI
- UIKit
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:- SwiftUI
- UIKit
Implementation Flow
Customization Options
Hide the option:- SwiftUI
- UIKit
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