Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

Update conversation group

Modify the display name, custom metadata, or hidden state of a conversation group.

Copy

Specify the target group via conversationGroupID. Include only the fields you wish to update, providing at least one mutable property.

Code example

import sdk, { UpdateConversationGroupReq, UpdateConversationGroupResp } from '@openimsdk/imsdk';

const request: UpdateConversationGroupReq = {
  conversationGroupID: conversationGroupID,
  name: 'Priority Work',
  hidden: false,
};
const response: UpdateConversationGroupResp = await sdk.updateConversationGroup(request);
const updatedGroup = response.conversationGroup;

Parameters

ParameterTypeRequiredDescription
conversationGroupIDstringYesTarget conversation group identifier.
namestringNoNew group display name.
exstringNoUpdated complete metadata string.
hiddenbooleanNoWhether to hide this group from the interface.

Return value

Returns a Promise that resolves to an UpdateConversationGroupResp object:

PropertyTypeDescription
conversationGroupIMConversationGroupThe updated conversation group record.

State changes after the call

Upon Promise resolution, update your local view by matching the returned group on conversationGroupID. The server broadcasts updates to other devices via EventOnConversationGroupChanged. For complete event handling and cleanup patterns, see Conversation groups overview.