SDKsReact NativeEnterprise
Create a conversation group
Create a new conversation categorization group for the current account using the OpenIM React Native SDK.
Create a new conversation group for the authenticated account. Supply at least name when creating a custom group, and optionally specify an initial conversation to associate:
const group = await OpenIMSDK.createConversationGroup({
name: 'Work',
order: 100,
conversationID,
conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the conversation group. |
order | number | No | Ordering priority value for list sorting. |
ex | string | No | Custom extension string for this group. |
conversationID | string | No | Initial conversation ID to add to the group upon creation. |
conversationGroupType | ConversationGroupType | No | Group type: pass ConversationGroupTypeNormal for custom groups. |
Return value
Resolves to a ConversationGroupResp object containing conversationGroupID, name, order, and conversationIDs.
Creation triggers the OnConversationGroupAdded event. Use conversationGroupID as the primary key to insert or reconcile the group in local state, and use conversationID to manage member conversations inside the group. For event registration, see Conversation groups overview.
Was this page helpful?