Functions
addConnectionStatusListener
addReadReceiptReceivedListener
addReceiptRequestListener
addReceiptResponseListener
addReceiveMessageListener
addToBlacklist
- addToBlacklist(userId: string, callback: (result: BaseResult) => void): void
-
Parameters
-
userId: string
-
callback: (result: BaseResult) => void
Returns void
cancelDownloadMediaMessage
- cancelDownloadMediaMessage(messageId: number, callback: (result: BaseResult) => void): void
-
Parameters
-
messageId: number
-
callback: (result: BaseResult) => void
Returns void
cancelSendMediaMessage
- cancelSendMediaMessage(messageId: number, callback: (result: BaseResult) => void): void
-
Parameters
-
messageId: number
-
callback: (result: BaseResult) => void
Returns void
cleanHistoryMessages
- cleanHistoryMessages(conversationType: ConversationType, targetId: string, recordTime: number, clearRemote: boolean, callback: (result: BaseResult) => void): void
-
Parameters
-
-
targetId: string
-
recordTime: number
-
clearRemote: boolean
-
callback: (result: BaseResult) => void
Returns void
cleanRemoteHistoryMessages
- cleanRemoteHistoryMessages(conversationType: ConversationType, targetId: string, recordTime: number, callback: (result: BaseResult) => void): void
-
Parameters
-
-
targetId: string
-
recordTime: number
-
callback: (result: BaseResult) => void
Returns void
clearConnectionStatusListener
- clearConnectionStatusListener(): void
clearLogInfoListener
- clearLogInfoListener(): void
clearMessages
-
Parameters
-
-
targetId: string
-
callback: (result: BaseResult) => void
Returns void
clearMessagesUnreadStatus
- clearMessagesUnreadStatus(conversationType: ConversationType, targetId: string, time?: number, callback: (result: BaseResult) => void): void
-
Parameters
-
-
targetId: string
-
time: number = 0
-
callback: (result: BaseResult) => void
Returns void
clearReadReceiptReceivedListener
- clearReadReceiptReceivedListener(): void
clearRecallMessageListener
- clearRecallMessageListener(): void
clearReceiptRequestListener
- clearReceiptRequestListener(): void
clearReceiptResponseListener
- clearReceiptResponseListener(): void
clearReceiveMessageListener
- clearReceiveMessageListener(): void
clearTextMessageDraft
-
Parameters
-
-
targetId: string
-
callback: (result: BaseResult) => void
Returns void
clearTypingStatusListener
- clearTypingStatusListener(): void
connect
- connect(token: string, callback: (result: ConnectResult) => void): void
deleteMessages
-
Parameters
-
-
targetId: string = ''
-
callback: (result: BaseResult) => void
Returns void
deleteMessagesByIds
- deleteMessagesByIds(ids: number[], callback: (result: BaseResult) => void): void
-
Parameters
-
ids: number[]
-
callback: (result: BaseResult) => void
Returns void
disconnect
- disconnect(isReceivePush?: boolean): void
-
Parameters
-
isReceivePush: boolean = true
Returns void
getBlacklist
- getBlacklist(callback: (result: { code: number; list?: string[] }) => void): void
-
Parameters
-
callback: (result: { code: number; list?: string[] }) => void
-
- (result: { code: number; list?: string[] }): void
-
Parameters
-
result: { code: number; list?: string[] }
-
code: number
-
Optional list?: string[]
Returns void
Returns void
getBlacklistStatus
- getBlacklistStatus(userId: string, callback: (result: statusResult) => void): void
getBlockedConversationList
getChatRoomInfo
-
Parameters
-
targetId: string
-
memberCount: number = 20
-
-
Returns void
getConnectionStatus
- getConnectionStatus(callback: (result: { status: ConnectionStatus }) => {}): void
getConversationList
-
Parameters
-
-
count: number = 0
-
timestamp: number = 0
-
Returns void
getConversationNotificationStatus
getCurrentUserId
- getCurrentUserId(callback: (result: { userId: string }) => void): void
-
Parameters
-
callback: (result: { userId: string }) => void
-
- (result: { userId: string }): void
-
Parameters
-
result: { userId: string }
Returns void
Returns void
getHistoryMessages
- getHistoryMessages(conversationType: ConversationType, targetId: string, objectName?: string, baseMessageId?: number, count?: number, isForward?: boolean, callback: (result: MessageListResult) => void): void
-
Parameters
-
-
targetId: string
-
objectName: string = ''
-
baseMessageId: number = -1
-
count: number = 10
-
isForward: boolean = true
-
Returns void
getHistoryMessagesByTimestamp
- getHistoryMessagesByTimestamp(conversationType: ConversationType, targetId: string, objectNames: ObjectName[], timestamp?: number, count?: number, isForward?: boolean, callback: (result: MessageListResult) => void): void
-
Parameters
-
-
targetId: string
-
-
timestamp: number = 0
-
count: number = 10
-
isForward: boolean = true
-
Returns void
getMessage
- getMessage(messageId: number, callback: (result: MessageResult) => void): void
getMessageByUId
- getMessageByUId(messageUId: string, callback: (result: MessageResult) => void): void
getMessageCount
- getMessageCount(conversationType: ConversationType, targetId: string, callback: (result: { code: number; count?: number }) => void): void
-
Parameters
-
-
targetId: string
-
callback: (result: { code: number; count?: number }) => void
-
- (result: { code: number; count?: number }): void
-
Parameters
-
result: { code: number; count?: number }
-
code: number
-
Optional count?: number
Returns void
Returns void
getMessageSendTime
- getMessageSendTime(messageId: number, callback: (result: number) => void): void
-
Parameters
-
messageId: number
-
callback: (result: number) => void
Returns void
getNotificationQuietHours
- getNotificationQuietHours(callback: (result: { code: number; spanMinutes: number; startTime: string }) => void): void
-
Parameters
-
callback: (result: { code: number; spanMinutes: number; startTime: string }) => void
-
- (result: { code: number; spanMinutes: number; startTime: string }): void
-
Parameters
-
result: { code: number; spanMinutes: number; startTime: string }
-
code: number
-
spanMinutes: number
-
startTime: string
Returns void
Returns void
getOfflineMessageDuration
- getOfflineMessageDuration(callback: (result: { code: number; duration: number }) => void): void
-
Parameters
-
callback: (result: { code: number; duration: number }) => void
-
- (result: { code: number; duration: number }): void
-
Parameters
-
result: { code: number; duration: number }
-
code: number
-
duration: number
Returns void
Returns void
getPushContentShowStatus
- getPushContentShowStatus(callback: (result: statusResult) => void): void
getRemoteChatRoomHistoryMessages
- getRemoteChatRoomHistoryMessages(targetId: string, recordTime: number, count: number, order: TimestampOrder, callback: (result: { code: number; messages: Message[]; syncTime: number }) => void): void
-
Parameters
-
targetId: string
-
recordTime: number
-
count: number
-
-
callback: (result: { code: number; messages: Message[]; syncTime: number }) => void
-
- (result: { code: number; messages: Message[]; syncTime: number }): void
-
Parameters
-
result: { code: number; messages: Message[]; syncTime: number }
-
code: number
-
-
syncTime: number
Returns void
Returns void
getRemoteHistoryMessages
-
Parameters
-
-
targetId: string
-
sentTime: number
-
count: number
-
Returns void
getTextMessageDraft
-
Parameters
-
-
targetId: string
-
callback: (result: DraftResult) => void
Returns void
getTotalUnreadCount
- getTotalUnreadCount(callback: (result: CountResult) => void): void
getUnreadCount
-
Parameters
-
-
targetId: string = ''
-
callback: (result: CountResult) => void
Returns void
getUnreadMentionedMessages
init
- init(appKey: string): void
insertIncomingMessage
- insertIncomingMessage(conversationType: ConversationType, targetId: string, senderUserId: string, receivedStatus: number, messageContent: MessageContent, sentTime?: number, callback: (result: MessageResult) => void): void
-
Parameters
-
-
targetId: string
-
senderUserId: string
-
receivedStatus: number
-
-
sentTime: number = 0
-
callback: (result: MessageResult) => void
Returns void
insertOutgoingMessage
-
Parameters
-
-
targetId: string
-
-
-
sentTime: number = 0
-
callback: (result: MessageResult) => void
Returns any
joinChatRoom
- joinChatRoom(targetId: string, messageCount?: number, callback: (result: BaseResult) => void): void
-
Parameters
-
targetId: string
-
messageCount: number = 10
-
callback: (result: BaseResult) => void
Returns void
joinExistChatRoom
- joinExistChatRoom(targetId: string, messageCount?: number, callback: (result: BaseResult) => void): void
-
Parameters
-
targetId: string
-
messageCount: number = 10
-
callback: (result: BaseResult) => void
Returns void
quitChatRoom
- quitChatRoom(targetId: string, callback: (result: BaseResult) => void): void
-
Parameters
-
targetId: string
-
callback: (result: BaseResult) => void
Returns void
recallMessage
-
Parameters
-
messageId: number
-
pushContent: string = ''
-
Returns void
removeConversation
-
Parameters
-
-
targetId: string
-
callback: (conversation: BaseResult) => void
Returns void
removeFromBlacklist
- removeFromBlacklist(userId: string, callback: (result: BaseResult) => void): void
-
Parameters
-
userId: string
-
callback: (result: BaseResult) => void
Returns void
removeNotificationQuietHours
- removeNotificationQuietHours(callback: (result: BaseResult) => void): void
saveTextMessageDraft
- saveTextMessageDraft(conversationType: ConversationType, targetId: string, content: string, callback: (result: BaseResult) => void): void
-
Parameters
-
-
targetId: string
-
content: string
-
callback: (result: BaseResult) => void
Returns void
searchMessages
- searchMessages(conversationType: ConversationType, targetId: string, keyword: string, count: number, startTime?: number, callback: (result: MessageListResult) => void): void
-
Parameters
-
-
targetId: string
-
keyword: string
-
count: number
-
startTime: number = 0
-
Returns void
sendReadReceiptMessage
- sendReadReceiptMessage(conversationType: ConversationType, targetId: string, timestamp: number): void
-
Parameters
-
-
targetId: string
-
timestamp: number
Returns void
sendReadReceiptRequest
- sendReadReceiptRequest(messageId: number, callback: (result: BaseResult) => void): void
-
Parameters
-
messageId: number
-
callback: (result: BaseResult) => void
Returns void
sendReadReceiptResponse
-
Parameters
-
-
targetId: string
-
-
callback: (result: BaseResult) => void
Returns void
setConversationNotificationStatus
- setConversationNotificationStatus(conversationType: ConversationType, targetId: string, isBlock: boolean, callback: (result: statusResult) => void): void
-
Parameters
-
-
targetId: string
-
isBlock: boolean
-
callback: (result: statusResult) => void
Returns void
setConversationToTop
- setConversationToTop(conversationType: ConversationType, targetId: string, isTop: boolean, callback: (result: BaseResult) => void): void
-
Parameters
-
-
targetId: string
-
isTop: boolean
-
callback: (result: BaseResult) => void
Returns void
setMessageExtra
- setMessageExtra(messageId: number, extra: string, callback: (result: BaseResult) => void): void
-
Parameters
-
messageId: number
-
extra: string
-
callback: (result: BaseResult) => void
Returns void
setMessageReceivedStatus
- setMessageReceivedStatus(messageId: number, status: number, callback: (result: { code: number }) => {}): any
-
Parameters
-
messageId: number
-
status: number
-
callback: (result: { code: number }) => {}
-
- (result: { code: number }): {}
Returns any
setMessageSentStatus
- setMessageSentStatus(messageId: number, status: SentStatus, callback: (result: { code: number }) => {}): any
-
Parameters
-
messageId: number
-
-
callback: (result: { code: number }) => {}
-
- (result: { code: number }): {}
Returns any
setNotificationQuietHours
- setNotificationQuietHours(startTime: string, spanMinutes: number, callback: (result: BaseResult) => void): void
-
Parameters
-
startTime: string
-
spanMinutes: number
-
callback: (result: BaseResult) => void
Returns void
setOfflineMessageDuration
- setOfflineMessageDuration(duration: number, callback: (result: BaseResult) => void): void
-
Parameters
-
duration: number
-
callback: (result: BaseResult) => void
Returns void
setPushContentShowStatus
- setPushContentShowStatus(isShowPushContent: boolean, callback: (result: BaseResult) => void): void
-
Parameters
-
isShowPushContent: boolean
-
callback: (result: BaseResult) => void
Returns void
setReconnectKickEnable
- setReconnectKickEnable(enabled: boolean): void
setServerInfo
- setServerInfo(naviServer: string, fileServer: string): void
-
Parameters
-
naviServer: string
-
fileServer: string
Returns void
setStatisticServer
- setStatisticServer(server: string): void
syncConversationReadStatus
- syncConversationReadStatus(conversationType: ConversationType, targetId: string, timestamp: number, callback: (result: BaseResult) => void): void
-
Parameters
-
-
targetId: string
-
timestamp: number
-
callback: (result: BaseResult) => void
Returns void
连接状态