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 the information of a conversation
zim_->queryConversation(
"conv_id", conv_type,
[=](std::shared_ptr<zim::ZIMConversation> conv, const zim::ZIMError &errorInfo) {
// Operation result
if (errorInfo.code == zim::ZIMErrorCode::ZIM_ERROR_CODE_SUCCESS) {
// Operation succeeded
} else {
// Operation failed, you can print the error code and error message and troubleshoot the error by looking for the ZIM official error code documentation.
}
});
1