- Android
- iOS
- JavaScript
- Flutter
- ReactNative
Get the list of conversations in a tag. Pagination is supported.
Code Example
GetConversationOptions o = new GetConversationOptions();
o.setCount(20);
o.setTimestamp(0);
o.setPullDirection(JIMConst.PullDirection.OLDER);
o.setTagId("Tag111");
List<ConversationInfo> infoList = JIM.getInstance().getConversationManager().getConversationInfoList(o);
Get the list of conversations in a tag. Pagination is supported.
Code Example
JGetConversationOptions *o = [[JGetConversationOptions alloc] init];
o.tagId = @"Tag111";
o.count = 20;
o.timestamp = 0;
o.direction = JPullDirectionOlder;
NSArray *arr = [JIM.shared.conversationManager getConversationInfoListWith:o];
Get the list of conversations in a tag. Pagination is supported.

Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| option | Object | Yes | 1.7.5 | ||
| option.tag | String | Yes | 1.7.5 | ||
| option.count | Number | No | 50 | Retrieve the specified number of conversations, up to 100 conversations per request. | 1.0.0 |
| option.order | Number | No | FORWARD | Retrieval direction. Retrieves older or newer conversations; use with the time property. | 1.0.0 |
| option.time | Number | No | 0 | Retrieve conversations starting from the specified time. Use with order to retrieve older or newer conversations. | 1.0.0 |
Callback Parameters
| Property | Type | Description | Version |
|---|---|---|---|
| result | Object | Query result | 1.0.0 |
| result.conversations | Array | Conversation array. See Conversation for the structure of each conversation object. | 1.0.0 |
| result.isFinished | Boolean | Whether retrieval is complete | 1.0.0 |
Code Example
/*
Assume the current user has 199 conversations. Fetch 50 per page and sort the conversation list by time in descending order. Use the following pagination logic:
1. Page 1 retrieval options: { count: 50, time: 0 }
2. Page 2 retrieval options: { count: 50, time: 'the smallest sortTime in the page 1 conversation array (the conversation with the largest array index)' }
3. Page 3 retrieval options: { count: 50, time: 'the smallest sortTime in the page 2 conversation array (the conversation with the largest array index)' }
4. Page 4 retrieval options: { count: 50, time: 'the smallest sortTime in the page 3 conversation array (the conversation with the largest array index)' }
5. Finish: Stop loading when isFinished returns true
*/
let option = {
tag: 'tag_01'
}
jim.getConversations(option).then((result) => {
let { conversations, isFinished } = result;
console.log(isFinished, conversations);
})
Not supported.
Get the list of conversations in a tag. Pagination is supported.
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| tag | String | Yes | None | Tag ID | 0.6.3 |
| count | Number | No | 50 | Retrieve the specified number of conversations, up to 100 conversations per request. | 0.6.3 |
| timestamp | Number | No | 0 | Retrieve conversations starting from the specified time. | 0.6.3 |
| direction | Number | No | 1 | Retrieval direction: 0 retrieves conversations after timestamp; 1 retrieves conversations before timestamp. | 0.6.3 |
Code Example
import JuggleIM from 'juggleim-rnsdk';
const conversations = await JuggleIM.getConversationInfoList({
tag: 'tag_01',
count: 50,
timestamp: 0,
direction: 1
});