Properties
Private Readonly _draftMap
_draftMap: {} = {}
Type declaration
[userId: string]: {}
[targetIdConversationTypeChannelId: string]: string
Readonly channelId
channelId: string
Constructors
constructor
- new ChannelClient(logger: ILogger, _context: default, channelId: string, _isCPPMode: boolean, _readReceiptTimeout: number, _storage: AppStorage): ChannelClient
Parameters
logger: ILogger
_context: default
channelId: string
_isCPPMode: boolean
_readReceiptTimeout: number
_storage: AppStorage
Methods
getConversationList
- getConversationList(callback: ICallback<IConversation[], void>, conversationTypes: null | Number[], count?: number): void
Parameters
conversationTypes: null | Number[]
Optional count: number
Returns void
getConversation
Parameters
Returns void
removeConversation
Parameters
targetId: string
callback: ICallback<void, void>
Returns void
saveTextMessageDraft
- saveTextMessageDraft(conversationType: ConversationType, targetId: string, draftText: string): boolean
Parameters
targetId: string
draftText: string
Returns boolean
getTextMessageDraft
- getTextMessageDraft(conversationType: ConversationType, targetId: string): undefined | string
Parameters
Returns undefined | string
clearTextMessageDraft
- clearTextMessageDraft(conversationType: ConversationType, targetId: string): boolean
Parameters
Returns boolean
getTotalUnreadCount
Parameters
callback: ICallback<number, void>
Optional includeMuted: boolean
Returns void
getUnreadCount
Parameters
targetId: string
callback: ICallback<number, void>
Returns void
clearConversations
Parameters
Returns void
clearUnreadCount
Parameters
targetId: string
callback: ICallback<boolean, void>
Returns void
clearAllUnreadCount
- clearAllUnreadCount(callback: ICallback<boolean, void>): void
Parameters
Returns void
getFirstUnreadMessage
Parameters
Returns void
setConversationStatus
Parameters
targetId: string
callback: ICallback<void, void>
Returns void
sendMessage
Parameters
targetId: string
Optional isMentioned: boolean
Optional pushContent: string
Optional pushData: string
Returns void
sendRecallMessage
Parameters
Returns void
sendTypingStatusMessage
Parameters
targetId: string
typingContentType: string
Returns void
sendReceiptResponse
Parameters
Returns void
sendReadReceiptMessage
- sendReadReceiptMessage(messageUIds: string[], targetId: string, callback: ICallback<void, void>): void
Parameters
messageUIds: string[]
targetId: string
callback: ICallback<void, void>
Returns void
getMessageReader
Parameters
messageUId: string
targetId: string
Returns void
updateMessageExpansion
Parameters
expansionDic: {}
callback: ICallback<void, void>
Returns void
removeMessageExpansionForKey
Parameters
keys: string[]
callback: ICallback<void, void>
Returns void
getHistoryMessages
Parameters
targetId: string
timestamp: number
count: number
Optional objectName: string
Optional order: 0 | 1
Returns void
deleteRemoteMessages
Parameters
targetId: string
callback: ICallback<void, void>
Returns void
clearRemoteHistoryMessages
Parameters
Returns void
getConversationListWithAllChannel
Parameters
Returns void
getConversationListWithAllChannelByPage
- getConversationListWithAllChannelByPage(callback: ICallback<IConversation[], void>, index: number, limit: number): void
Parameters
index: number
limit: number
Returns void
insertMessage
Parameters
Returns void
batchInsertMessage
Parameters
checkDuplicate: boolean
callback: ICallback<boolean, void>
Returns void
getMessageCount
Parameters
targetId: string
callback: ICallback<number, void>
Returns void
deleteLocalMessagesByTimestamp
- deleteLocalMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, callback: ICallback<boolean, void>): void
Parameters
targetId: string
timestamp: number
cleanSpace: boolean
callback: ICallback<boolean, void>
Returns void
getRemoteHistoryMessages
Parameters
targetId: string
timestamp: number
count: number
options: { order?: 0 | 1 }
Returns void
clearMessages
Parameters
targetId: string
callback: ICallback<boolean, void>
Returns void
searchConversationByContent
Parameters
keyword: string
Optional customMessageType: string[]
Returns void
searchConversationByContentWithAllChannel
Parameters
keyword: string
customMessageTypes: string[] = []
Returns void
searchMessageByContent
Parameters
targetId: string
keyword: string
timestamp: number
count: number
total: number
Returns void
searchMessageByContentWithAllChannel
Parameters
targetId: string
keyword: string
timestamp: number
count: number
Returns void
searchMessageByContentInTimeRangeWithAllChannel
- searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number, callback: ICallback<IReceivedMessageV2[], void>): void
Parameters
targetId: string
keyword: string
startTime: number
endTime: number
offset: number
limit: number
Returns void
getUnreadMentionedMessages
Parameters
clearUnreadCountByTimestamp
- clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, callback: ICallback<boolean, void>): void
Parameters
targetId: string
timestamp: number
callback: ICallback<boolean, void>
Returns void
getConversationNotificationStatus
Parameters
Returns void
getGroupMessageDeliverList
- getGroupMessageDeliverList(targetId: string, messageUId: string, callback: ICallback<IGroupMessageDeliverInfo, void>): void
Parameters
targetId: string
messageUId: string
callback: ICallback<IGroupMessageDeliverInfo, void>
Returns void
getPrivateMessageDeliverTime
- getPrivateMessageDeliverTime(messageUId: string, callback: ICallback<number, void>): void
Parameters
messageUId: string
callback: ICallback<number, void>
Returns void
草稿数据