Browse SDKs · React Native
Platform
SDKsReact NativeEnterprise

Add conversations to groups

Batch assign one or more conversations into one or more conversation groups using the OpenIM React Native SDK.

Copy

Associate one or more conversations into one or more conversation groups in a batch operation:

await OpenIMSDK.addConversationsToGroups({
  conversationIDs: [conversationID],
  conversationGroupIDs: [conversationGroupID],
});

Parameters

ParameterTypeRequiredDescription
conversationIDsstring[]YesList of conversation IDs to add.
conversationGroupIDsstring[]YesList of destination conversation group IDs.

Return value

A resolved Promise confirms that the conversations were successfully assigned to the specified groups.

Membership updates trigger the OnConversationGroupMemberAdded event. In local state reconciliation, identify the target group by conversationGroupID and append member conversation records by conversationID. For event registration, see Conversation groups overview.