Retrieve Recent Chats
Get Recent Chat#
To get the recent chat of a user or a group.
Refer this doc to know more about RecentChat Class
| Argument | Type | Description |
|---|---|---|
| JID | String | jid of the user/group |
caution
Will return a null object if a user never made a conversation with that user/group.
Get Recent Chat list#
To get the recent chat list
Provides recent chat list without Archive
Get messages by pagination#
Initialization#
Create a FetchMessageListParams instance. Here, you can set the message filter to determine the message order and the starting point of the message list in the chat view.
| Argument | Type | Description |
|---|---|---|
| CHAT_ID | String | Jid of the user/group |
| MESSAGE_ID | String | Message id of the starting point optional |
| MESSAGE_TIME | Double | Message time of the starting point optional |
| EXCLUDE | Bool | If true starting point message will be excluded in message list default true |
| ASCENDING_ORDER | Bool | If true message list will be returned ascendingOrder by message time default false |
| LIMIT | Int | No of messages will be fetched for each request default50 |
Secondly, create a FetchMessageListQuery instance.
| Argument | Type | Description |
|---|---|---|
| MESSAGE_LIST_PARAM | FetchMessageListParams | Insatance of 'FetchMessageListParams' |
Load Initial Messages#
To fetch initial conversations between you and a single chat user or group, call the below method.
| Argument | Type | Description |
|---|---|---|
| CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
Load Previous Messages#
To fetch previous conversations between you and a single chat user or group, call the below method.
| Argument | Type | Description |
|---|---|---|
| CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
Load Next Messages#
To fetch next conversations between you and a single chat user or group, call the below method.
| Argument | Type | Description |
|---|---|---|
| CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
Check Previous Set of Messages availability#
To check previous set of conversations available or not, call the below method.
Check Next Set of Messages availability#
To check next set of conversations available or not, call the below method.
Check Message Fetching InProgress#
Get RecentChat by pagination#
Create a RecentChatListParams instance. Here, you can set the recentchat filter options .
| Argument | Type | Description |
|---|---|---|
| LIMIT | Int | No of recent chats will be fetched for each request default 40 |
Secondly, create a RecentChatListBuilder instance.
| Argument | Type | Description |
|---|---|---|
| RECENT_LIST_PARAM | RecentChatListParams | Insatance of 'RecentChatListParams |
Load Initial RecentChats#
To fetch initial set of recentChat data, call the below method.
| Argument | Type | Description |
|---|---|---|
| CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
Load Next RecentChats#
To fetch next set of recentChats, call the below method.
| Argument | Type | Description |
|---|---|---|
| CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
Get Recent Chat list with archived chats#
To get the recent chat list including the arhived chat conversation call the below method.
Unread count#
If you want to get the unread count of chat messages, you can utilise the below method.