Chat Room
You can use the methods from the TapCoreChatRoomManager class to manage chat rooms.
Method Name
Description
Create new personal chat room with recipient user, or obtain chat room data if it already exists.
Create new personal chat room with recipient user ID, or obtain chat room data if it already exists.
Create new personal chat room with recipient XC user ID, or obtain chat room data if it already exists.
Create a new group chat room with selected group name.
Create a new group chat room with selected group name and group picture.
Get group room data from selected group room ID.
Update existing group chat room data.
Update group picture with current selected image.
Delete group chat room and clear all chat data and participants.
Leave from selected group chat.
Add selected member(s) to current group chat room.
Remove selected member(s) from current group chat room.
Promote selected member(s) as admin(s) to the current group chat room.
Demote selected admin(s) to member(s) to the current group chat room.
Notify that the active user has started typing in the selected room.
Notify that the active user has stopped typing in the selected room.
Retrieve existing media messages from a chat room
Mark a chat room as unread by the active user.
Get a list of chat rooms marked as unread by the active user.
Clear all existing messages in a selected chat room for the active user.
Get Personal Chat Room with Recipient User Model
Create new personal chat room with recipient user, or obtain chat room data if it already exists.
Parameters
RECIPIENT_USER
: (TAPUserModel) recipient user data
Get Personal Chat Room with Recipient User ID
Create new personal chat room with recipient user ID, or obtain chat room data if it already exists.
Parameters
RECIPIENT_ID
: (String) user ID of recipient
Get Personal Chat Room with Recipient XC User ID
Create new personal chat room with recipient user ID, or obtain chat room data if it already exists.
Parameters
XC_USER_ID
: (String) XC user ID of recipient
Create Group Chat Room
Create a new group chat room with selected group name.
Parameters
GROUP_NAME
: (String) your group name
PARTICIPANT_LIST
: (List) list of the group participant's user IDs
Create Group Chat Room With Group Image
Create a new group chat room with selected group name and group picture.
Parameters
GROUP_NAME
: (String) name of the group chat room to create
PARTICIPANT_LIST
: (List) list of the group participant's user IDs
IMAGE_FILE
: (File) picture to be uploaded as the group's profile
Get Group Chat Room
Get group room data from selected group room ID.
Parameters
GROUP_ID
: (String) room ID of group
Update Group Chat Room Details
Create a new Update existing group chat room data.
Parameters
GROUP_ID
: (String) room ID of group
GROUP_NAME
: (String) name of group
Update Group Image
Update group picture with current selected image.
Parameters
GROUP_ID
: (String) room ID of the selected group
IMAGE_FILE
: (File) new picture for the group's profile
Delete Group Chat Room
Delete group chat room and clear all chat data and participants.
Parameters
ROOM_ID
: (String) a room id of the group to delete
Leave Group Chat
Leave from selected group chat.
Parameters
GROUP_ID
: (String) room ID of the selected group
Add Members to Group Chat
Add selected member(s) to current group chat room.
Parameters
GROUP_ID
: (String) room ID of the selected group
USER_IDs
: (List) list of the user IDs to add to the group
Remove Members from Group Chat
Remove selected member(s) from current group chat room.
Parameters
GROUP_ID
: (String) room ID of the selected group
USER_IDs
: (List) list of the user IDs to add to the group
Promote Group Admin
Promote selected member(s) as admin(s) to the current group chat room.
Parameters
GROUP_ID
: (String) room ID of the selected group
USER_IDs
: (List) list of the user IDs to add to the group
Demote Group Admin
Demote selected admin(s) to member(s) to the current group chat room.
Parameters
GROUP_ID
: (String) room ID of the selected group
USER_IDs
: (List) list of the user IDs to add to the group
Send Start Typing
Notify that the active user has started typing in the selected room.
Parameters
ROOM_ID
: (String) ID of the room where the user starts typing in
Send Stop Typing
Notify that the active user has stopped typing in the selected room.
Get Room Media
Parameters
ROOM_ID
: (String) Group ID
MIN_CREATED
: (Long) Minimum Created Time in Millisecond. Leave empty if unnecessary
Mark Chat Room as Unread
You can mark your chat room as unread.
ROOM_ID: (Number) room id CALLBACK: (Object) object of callback methods
Get Marked as Unread Chat Room List
You can retrieve unread room list.
CALLBACK: (Object) object of callback methods
Delete All Chat Room Messages
Use the deleteAllChatRoomMessages:
method from the TapCoreChatRoomManager class to clear all existing messages in a selected chat room for the active user. The selected messages will only be deleted for the active user, and will not affect the other participants in the selected room.
ROOM_IDS: (Array<Number>) IDs of the target rooms to delete the messages from
Get Group In Common
You can retrieve group in common list.
USER_ID: (Number) user id CALLBACK: (Object) object of callback methods
Last updated