logo
In-app Chat
SDK Error Codes
Powered Byspreading
On this page

Query a conversation


Introduction

ZIM supports querying detailed information of a conversation by specifying the conversation ID.

Procedures

After the login, a user can use the queryConversation interface to specify the conversation ID and conversation type to get detailed information about the corresponding conversation, including the conversation name, unread count, and notification status.

Untitled
// Query conversation information
var conversationID = "xxx";
var conversationType = 0;

zim.queryConversation(conversationID, conversationType)
    .then(function({ conversation }){
        // Query successful, you need to save and maintain the conversation object in the array
    })
    .catch(function(err){
        // Query failed
    })
1
Copied!

Previous

Pin a conversation

Next

Set conversation draft