Messages

ConstructTapTalkMessageModel

1
tapCoreMessageManager.constructTapTalkMessageModel(MESSAGE_BODY, ROOM, MESSAGE_TYPE, MESSAGE_DATA, LOCAL_ID = null, forwardMessage = false);
Copied!
MESSAGE_BODY: (String) message body for message model ROOM: (Object) room model for message model MESSAGE_TYPE: (Number) message type for message model MESSAGE_DATA: (Object) data object for message model LOCAL_ID: (String) custom value for preference local id default is null FORWARD_MESSAGE: (Object) message model of message you want to forward

ConstructTapTalkMessageModelWithQuote

1
tapCoreMessageManager.constructTapTalkMessageModelWithQuote(MESSAGE_BODY, ROOM, MESSAGE_TYPE, MESSAGE_DATA, QUOTED_MESSAGE = false, LOCAL_ID = null, QUOTE_TITLE= false, QUOTE_CONTENT = false, QUOTED_IMAGE_URL = false);
Copied!
MESSAGE_BODY: (String) message body for message model ROOM: (Object) room model for message model MESSAGE_TYPE: (Number) message type for message model MESSAGE_DATA: (Object) data object for message model LOCAL_ID: (String) custom value for preference local id default is null QUOTED_MESSAGE: (Object) message model of message you want to quoted QUOTE_TITLE: (String) title for your quoted message default is false QUOTE_CONTENT: (String) content for your quoted message default is false QUOTED_IMAGE_URL: (String) image url for your quoted message default is false

SendCustomMessage

1
tapCoreMessageManager.sendCustomMessage(MESSAGE_MODEL, (message) => {
2
// do action here
3
});
Copied!
MESSAGE_MODEL: (Object) message model for your message

SearchLocalRoomMessageWithKeyword

Call this method to search messages from the chat room with a keyword.
1
tapCoreMessageManager.searchLocalRoomMessageWithKeyword(KEYWORD, ROOM_ID, {
2
onSuccess: (response) => {
3
// do action here
4
},
5
onError: (message) => {
6
// do action here
7
}
8
});
Copied!
KEYWORD: (String) message keyword ROOM_ID: (number) room id CALLBACK: (Object) callback method

SearchLocalMessageWithKeyword

Call this method to search messages from all chat room with a keyword.
1
tapCoreMessageManager.searchLocalMessageWithKeyword(KEYWORD, {
2
onSuccess: (response) => {
3
// do action here
4
},
5
onError: (message) => {
6
// do action here
7
}
8
});
Copied!
KEYWORD: (String) message keyword CALLBACK: (Object) callback method

StarMessage

You may use these methods to mark a message or multiple messages as starred.
1
tapCoreMessageManager.starMessage(ROOM_ID, MESSAGE_IDs, {
2
onSuccess: (res) => {
3
// do action here
4
},
5
onError: (errCode, errMessage) => {
6
// do action here
7
}
8
);
Copied!
ROOM_ID: (Number) room id MESSAGE_IDs: (Array) array of message id CALLBACK: (Object) object of callback methods

UnstarMessage

You may use these methods to remove messages from the starred list.
1
tapCoreMessageManager.unstarMessage(ROOM_ID, MESSAGE_IDs, {
2
onSuccess: (res) => {
3
// do action here
4
},
5
onError: (errCode, errMessage) => {
6
// do action here
7
}
8
);
Copied!
ROOM_ID: (Number) room id MESSAGE_IDs: (Array) array of message id CALLBACK: (Object) object of callback methods

GetStarredMessageIds

You can use the method below get a list of message IDs marked as starred by the user.
1
tapCoreMessageManager.getStarredMessageIds(roomID, {
2
onSuccess: (res) => {
3
// do action here
4
},
5
onError: (errCode, errMessage) => {
6
// do action here
7
}
8
});
Copied!
ROOM_ID: (Number) room id CALLBACK: (Object) object of callback methods

FetchStarredMessages

You can use the method below get a list of message IDs marked as starred by the user.
1
tapCoreMessageManager.fetchStarredMessages(ROOM_ID, {
2
onSuccess: (res) => {
3
// do action here
4
},
5
onError: (errCode, errMessage) => {
6
// do action here
7
}
8
});
Copied!
ROOM_ID: (Number) room id CALLBACK: (Object) object of callback methods

MarkChatRoomAsUnread

You can mark your chat room as unread.
1
tapCoreChatRoomManager.markChatRoomAsUnread(ROOM_ID, {
2
onSuccess: (res) => {
3
// do action here
4
},
5
onError: (errCode, errMessage) => {
6
// do action here
7
}
8
});
Copied!
ROOM_ID: (Number) room id CALLBACK: (Object) object of callback methods

GetMarkedAsUnreadChatRoomList

You can retrieve unread room list.
1
tapCoreChatRoomManager.getMarkedAsUnreadChatRoomList({
2
onSuccess: (res) => {
3
// do action here
4
},
5
onError: (errCode, errMessage) => {
6
// do action here
7
}
8
});
Copied!
CALLBACK: (Object) object of callback methods