Room List
If you are using core implementation type, the application's chat room list can be managed with the TapCoreRoomListManager class using the following methods:
TapTalk Room List Method
Description
​Get Updated Room List​
Call this method to fetch the latest room list data from the server and update to the local cache
Get Room List by XC User ID
Call this method to get room list by XC User ID
Get Personal Chat Room with User Model
Call this method to get personal chat room model with user model.
Get User by ID
Call this method to get user data by ID
Remove Chat Room by Room ID
Call this method to remove single room from room list

Get Updated Room List

Call this method to retrieve the latest room list data from the server.
JavaScript
1
tapCoreRoomListManager.getUpdatedRoomList({
2
onSuccess: (roomLists) => {
3
// do action here
4
},
5
})
Copied!

Get Room List by XC User ID

Call this method to get room list by XC User ID
JavaScript
1
tapCoreRoomListManager.getRoomByXcID(xcRoomID, {
2
onSuccess: (response) => {
3
// do action here
4
},
5
onError: (errorCode, errorMessage) => {
6
// do action here
7
}
8
})
Copied!

Get Personal Chat Room with User Model

Call this method to get personal chat room model with user model.
JavaScript
1
var roomModel = tapCoreRoomListManager.getPersonalChatRoomWithUser(userModel)
Copied!

Get User by ID

Call this method to get user data by ID
JavaScript
1
tapCoreRoomListManager.getUserByIdFromApi(userID, {
2
onSuccess: (response) => {
3
// do action here
4
},
5
onError: (errorCode, errorMessage) => {
6
// do action here
7
}
8
})
Copied!

Remove Chat Room by Room ID

Call this method to remove single room from room list
JavaScript
1
tapCoreRoomListManager.removeChatRoomByRoomID(roomID)
Copied!
Last modified 1yr ago