- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Retrieve information for the specified conversation by its Conversation identifier. An empty object indicates that no conversation information exists.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
Code Example
ConversationInfo info = JIM.getInstance().getConversationManager().getConversationInfo(conversation);
Retrieve information for the specified conversation by its JConversation identifier. An empty object indicates that no conversation information exists.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | JConversation | Conversation identifier | 1.0.0 |
Code Example
JConversation *conversation = [[JConversation alloc] initWithConversationType:JConversationTypeGroup conversationId:@"groupId1"];
JConversationInfo *info = [JIM.shared.conversationManager getConversationInfo:conversation];
Retrieve the specified conversation by conversationType and conversationId. If it is not available locally, it is retrieved from the cloud. An empty object indicates that no conversation information exists.
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| conversation | Object | Yes | None | Object that identifies the conversation | 1.0.0 |
| conversation.conversationId | String | Yes | None | Conversation ID | 1.0.0 |
| conversation.conversationType | Number | Yes | None | Conversation type | 1.0.0 |
Callback Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| result | Object | Return value | 1.0.0 |
| result.conversation | Object | An empty object indicates that the conversation does not exist. See Conversation for its properties. | 1.0.0 |
Code Example
let { ConversationType } = JIM;
let conversation = {
conversationType: ConversationType.PRIVATE,
conversationId: 'userId01'
};
jim.getConversation(conversation).then(({ conversation }) => {
console.log(conversation);
});
Retrieve information for the specified conversation by its Conversation identifier. An empty object indicates that no conversation information exists.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
API Definition
//Callback definition
export type ConversationCallback = (code:number,conver:ConversationInfo|null)=>void
/**
* get information about a single conversation
* @param conver conversation identifier
* @return conversation information
*/
getConversation(conver:Conversation,callback:ConversationCallback)
Code Example
JuggleIm.instance.getConversationManager().getConversation(new Conversation("userid2",1),(conver)=>{
})
Retrieve information for the specified conversation. An empty object indicates that no conversation information exists. This method retrieves conversation information only from the local database and does not retrieve it from the cloud.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversationType | int | Conversation type | 0.6.3 |
| conversationId | String | Conversation identifier | 0.6.3 |
Code Example
Conversation conversation = Conversation(ConversationType.group, 'groupId1');
ConversationInfo? conversationInfo = await JuggleIm.instance.getConversationInfo(conversation);
Retrieve information for the specified conversation. An empty object indicates that no conversation information exists. This method retrieves conversation information only from the local database and does not retrieve it from the cloud.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversationType | Number | Conversation type | 0.6.3 |
| conversationId | String | Conversation identifier | 0.6.3 |
Code Example
import JuggleIM from 'juggleim-rnsdk';
const conversationInfo = await JuggleIM.getConversationInfo({
conversationType: 2,
conversationId: 'groupId1'
});