Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

Clear group mentions

Reset the @ mention badge status on a group conversation after the user reviews mentions.

Copy

Reset the group mention notification state back to normal after the user handles @ mentions in a group conversation:

Code example

import sdk, { ConvGroupAtType, SetConversationReq } from '@openimsdk/imsdk';

const request: SetConversationReq = {
  conversationID: conversationID,
  groupAtType: ConvGroupAtType.AtNormal,
};
await sdk.setConversation(request);

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesTarget conversation identifier.
groupAtTypeConvGroupAtTypeYesSet to ConvGroupAtType.AtNormal to clear active mention indicators.

Return value

Returns a Promise that resolves to void when the mention status is reset.

State changes after the call

This method only resets active mention flags; do not use it to synthesize artificial "@me" or "@all" notifications. After the Promise resolves, the SDK fires EventOnConversationChanged. Match the item by conversationID and update its groupAtType property in the UI, as described in Retrieve conversation list. Resetting mention status is distinct from acknowledging unread messages; to clear unread counts, see Mark conversation as read.