SDKsHarmonyOSEnterprise
Hide conversation
Hide a conversation entry from the current user’s conversation list.
Hide a conversation from the active conversation list view without deleting history:
Code example
import sdk, { HideConversationReq } from '@openimsdk/imsdk';
const request: HideConversationReq = {
conversationID: conversationID,
};
await sdk.hideConversation(request);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Target conversation identifier. |
Return value
Returns a Promise that resolves to void when the conversation is hidden.
State changes after the call
Hiding a conversation does not delete friend relationships, group memberships, or chat history. The conversation automatically re-appears in the conversation list as soon as a new message is received. Once the Promise resolves, remove the item from the visible list using conversationID. For conversation event listeners, see Retrieve conversation list.
Was this page helpful?