Browse SDKs · uni-app / uni-app x
Platform
SDKsuni-app / uni-app x

Clear group mentions

Reset group @ mention notification status to normal after processing relevant messages.

Copy

After a user reviews and handles @ mention alerts in a group conversation, reset groupAtType to OpenIMGroupMentionTypeNormal to clear the unhandled mention banner or badge.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesIdentifier of the target group conversation.
groupAtTypeOpenIMGroupMentionTypeYesSupply OpenIMGroupMentionTypeNormal to reset the mention badge.

Code example

import {
  OpenIMGroupMentionTypeNormal,
  setConversation,
} from '@/uni_modules/unix-openim-sdk'

await setConversation({
  conversationID,
  groupAtType: OpenIMGroupMentionTypeNormal,
})

The groupAtType property is maintained automatically by the SDK as incoming group messages arrive. Use this method strictly to reset the status back to normal; do not manually forge mention states such as @Me or @All. Clearing @ mentions is distinct from marking conversation messages as read.

Return value

The Promise resolves with void upon successful completion.

State changes after the call

Promise resolution indicates that the mention status was reset locally and sent to the server. You can immediately clear the mention indicator from your local UI model. The SDK then delivers onConversationChanged, where you can verify the persisted groupAtType using conversationID as the primary key. For the centralized conversation listener implementation, see Retrieve conversation list.