Reorder conversation groups
Change the display order of conversation groups in a batch.
Use setConversationGroupOrder() to reorder conversation groups in a batch. Each array item must provide both the group ID and its new ordering value.
Parameters
The method accepts an array directly. Each item uses these fields:
| Parameter | Type | Required | Description |
|---|---|---|---|
items[].conversationGroupID | string | Yes | Conversation group ID to reorder. |
items[].order | number | Yes | New ordering value. Define the sort direction consistently in the product. |
await openimsdk.setConversationGroupOrder([
{ conversationGroupID: firstGroupID, order: 100 },
{ conversationGroupID: secondGroupID, order: 200 },
]);Return result
A successful Promise means that the reorder request has completed. The method returns no group data for refreshing the UI. Update local state optimistically from the submitted order, then wait for the event or query the group list again and use the latest result.
Ordering changes may arrive through OnConversationGroupChanged. When the event arrives, use conversationGroupID to update the matching group. See Conversation group overview for the complete listener.
Was this page helpful?