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

Hide a conversation

Hide a conversation entry from the authenticated user’s active conversation list.

Copy

Invoke hideConversation() to hide a conversation from the authenticated user's active conversation list without deleting messages, leaving the group, or modifying relationship states for either party.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesIdentifier of the conversation to hide.

Code example

import { hideConversation } from '@/uni_modules/unix-openim-sdk'

await hideConversation(conversationID)

Hiding a conversation is ideal for temporarily dismissing a chat from the visible list. When new incoming messages arrive for this conversation or full synchronization runs, the conversation reappears in the list.

Return value

The Promise resolves with void upon successful completion.

State changes after the call

Promise resolution indicates that the hide request was committed. Immediately remove the conversation item matching conversationID from your visible list. When subsequent conversation events arrive, merge updates using conversationID. For the centralized conversation list listener, see Retrieve conversation list.