ChatMessageRepo class

Constructors

ChatMessageRepo.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addMessagePin(NIMMessage message, {String? ext}) Future<NIMResult<void>>
pin一条消息
clearChattingAccountWithId(String? sessionId, NIMConversationType conversationType, String conversationId) → dynamic
清除设置的当前聊天账号信息 @param sessionId 聊天对象id @param sessionType 聊天对象类型
collectMessage(NIMMessage message) Future<NIMResult<NIMCollection>>
收藏消息
createForwardMessageListFileDetail(List<NIMMessage> messages) Future<NIMResult<String>>
deleteLocalMessage(NIMMessage anchor, {String? ext}) Future<void>
删除消息,本地删除
deleteLocalMessageList(List<NIMMessage> messages, {String? ext}) Future<void>
批量删除消息,本地删除 messages 消息列表
deleteMessage(NIMMessage anchor, {String? ext}) Future<NIMResult<void>>
删除消息,远程删除
deleteMessageList(List<NIMMessage> messages, {String? ext}) Future<NIMResult<void>>
批量删除消息,远程删除
downloadAttachment(NIMDownloadMessageAttachmentParams params) Future<NIMResult<String>>
下载消息附件
fetchHistoryMessage(NIMMessageSearchParams params) Future<NIMResult<List<ChatMessage>>>
查询历史消息,从远端查询
fetchPinMessage(String conversationId) Future<NIMResult<List<ChatMessage>>>
获取Pin 的消息列表
fetchTeamMessageReceiptDetail(NIMMessage message) Future<NIMTeamMessageReadReceiptDetail?>
(群消息发送方)查询单条群组消息已读、未读账号列表
fillUserInfo(List<NIMMessage> list) Future<List<ChatMessage>>
为每条消息添加用户信息
forwardMessage(NIMMessage message, String conversationId, {NIMSendMessageParams? params}) Future<NIMResult<void>>
消息转发
getFriendInfo(List<String> accIds) Future<NIMResult<List<NIMFriend>>>
获取好友信息
getMessageList(NIMMessageListOption option, {bool enablePin = true, bool addUserInfo = true}) Future<NIMResult<List<ChatMessage>>>
getMessagesFromMergedMessage(MergedMessage mergedMsg) Future<NIMResult<List<NIMMessage>>>
获取合并转发消息中的消息列表
getP2PMessageReceipt(String conversationId) Future<NIMResult<NIMP2PMessageReadReceipt>>
insertLocalTextMessage(String conversationId, String text, {String? senderId, int? createTime}) → void
插入文本消息
insertLocalTipsMessageWithExt(String conversationId, String text, Map<String, dynamic> map, {int? time}) → void
插入Tips消息 支持设置extension
isNeedNotify(String accId) Future<bool>
是否打开消息提醒
markP2PMessageRead({required NIMMessage message}) Future<NIMResult<void>>
设置单聊中消息为已读状态
markTeamMessageRead(List<NIMMessage> messages) Future<NIMResult<void>>
设置群聊中消息为已读状态
queryTeam(String teamId) Future<NIMResult<NIMTeam>>
请求群组信息
regenAIMessage(NIMMessage message, NIMMessageAIRegenParams params) Future<NIMResult<void>>
重新生成AI消息
removeMessagePin(NIMMessage message, {String? ext}) Future<NIMResult<void>>
移除pin消息
replyMessage({required NIMMessage msg, required NIMMessage replyMsg, NIMSendMessageParams? params}) Future<NIMResult<void>>
回复消息
revokeMessage(NIMMessage message) Future<NIMResult<void>>
撤回消息
saveTipsMessage(String conversationId, String content) → void
本地保存tip 消息 不计入未读数
searchMessage(String keyWord, String sessionId, NIMConversationType conversationType) Future<List<ChatMessage>?>
根据关键字搜索消息
sendCustomNotification(String conversationId, String content, NIMSendCustomNotificationParams params) Future<NIMResult<void>>
发送自定义通知
sendMessage({required NIMMessage message, required String conversationId, NIMSendMessageParams? params}) Future<NIMResult<NIMSendMessageResult>>
发送消息
sendTextMessageWithMessageAck({required String conversationId, required String text}) Future<NIMResult<NIMSendMessageResult>>
发送文本消息 自动设置是否需要已读回执
setChattingAccount(String? account, NIMConversationType sessionType, String conversationId) → dynamic
设置当前聊天的账号
setNotify(String accId, bool notify) Future<NIMResult<void>>
设置账号的消息提醒状态
stopAIStreamMessage(NIMMessage message, NIMMessageAIStreamStopParams params) Future<NIMResult<void>>
停止流式输出
uploadMergedMessageFile(List<NIMMessage> messages) Future<NIMResult<MessageUploadInfo>>
合并并上传消息,返回上传后的url和md5

Constants

errorInBlackList → const int
黑名单错误码
errorPINLimited → const int
PIN消息限制错误码
errorRevokeTimeout → const int
mergeFileName → const String