AI Integration Quick Reference
AI Integration Quick Reference
Join a Group
UsejoinGroup() to start participating in a group conversation.
- Java
- Kotlin
joinGroup() method takes the following parameters:
| Parameter | Description |
|---|---|
GUID | The GUID of the group you would like to join |
groupType | Type of the group. CometChat provides 3 types of groups: 1. CometChatConstants.GROUP_TYPE_PUBLIC (public) 2. CometChatConstants.GROUP_TYPE_PASSWORD (password) 3. CometChatConstants.GROUP_TYPE_PRIVATE (private) |
password | Password is mandatory for password-protected groups. |
hasJoined parameter in the Group object.
Real-Time Group Member Joined Events
When a user joins a group, members receive a real-time event inonGroupMemberJoined() of the GroupListener class. The callback provides an Action object, the joined User, and the Group.
- Java
- Kotlin
Missed Group Member Joined Events
When fetching message history, if a member joined a group the logged-in user is part of, the list will contain anAction message with these fields:
action-joinedactionBy-Userobject containing the details of the user who joined the groupactionFor-Groupobject containing the details of the group the user has joined
Next Steps
Leave Group
Leave groups you no longer want to participate in
Retrieve Members
Fetch list of group members
Send Messages
Start sending messages in the group
Group Listeners
Handle real-time group events