Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxiuwen committed Sep 22, 2023
1 parent 65d2981 commit b951f1b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ChatClient.getInstance()
You can retrieve the messages in the specified conversation from the local database by specifying the conversation ID and chat type:

```typescript
// Sepcify the conversation ID.
// Specify the conversation ID.
const convId = "convId";
// Whether to create a conversation if the specified one does not exist. If you set it as true, this method always returns a conversation object.
const createIfNeed = true;
Expand All @@ -53,8 +53,8 @@ const convType = ChatConversationType.PeerChat;
// Call getConversation to retrieve the specified conversation.
ChatClient.getInstance()
.chatManager.getConversation(convId, convType, createIfNeed)
.then((message) => {
console.log("Getting conversations succeeds", message);
.then((conversation) => {
console.log("Getting conversations succeeds", conversation);
})
.catch((reason) => {
console.log("Getting conversations fails.", reason);
Expand Down

0 comments on commit b951f1b

Please sign in to comment.