SDKsHarmonyOSEnterprise
Set conversation group order
Batch update the display sorting order of conversation groups.
Supply pairs of conversation group identifiers and their corresponding integer order ranks to reorder conversation groups.
Code example
import sdk, { SetConversationGroupOrderReq } from '@openimsdk/imsdk';
const request: SetConversationGroupOrderReq = {
conversationGroupOrders: [
{ conversationGroupID: firstGroupID, order: 100 },
{ conversationGroupID: secondGroupID, order: 200 },
],
};
await sdk.setConversationGroupOrder(request);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationGroupOrders | ConversationGroupOrderItem[] | Yes | List of objects containing conversationGroupID and its updated order value. |
Return value
Returns a Promise that resolves to void upon successful submission of the ordering request.
State changes after the call
Promise resolution indicates that the server accepted the sort order request without returning full conversation group payloads. Adjust local group sorting order by matching conversationGroupID. Remote clients receive updates via EventOnConversationGroupChanged. For complete event handling, see Conversation groups overview.
Was this page helpful?