NIMChatroomMessage class

Inheritance
Annotations

Constructors

NIMChatroomMessage({bool enableHistory = true, bool isHighPriorityMessage = false, NIMChatroomMessageExtension? extension, String? messageId, String? sessionId, NIMSessionType? sessionType, required NIMMessageType messageType, int? messageSubType, NIMMessageStatus? status, required NIMMessageDirection messageDirection, String? fromAccount, String? content, required int timestamp, NIMMessageAttachment? messageAttachment, NIMMessageAttachmentStatus? attachmentStatus, String? uuid, int? serverId, Map<String, dynamic>? remoteExtension, Map<String, dynamic>? localExtension, String? callbackExtension, Map<String, dynamic>? pushPayload, String? pushContent, NIMMemberPushOption? memberPushOption, NIMClientType? senderClientType, NIMAntiSpamOption? antiSpamOption, bool messageAck = false, bool hasSendAck = false, int ackCount = 0, int unAckCount = 0, bool clientAntiSpam = false, bool isInBlackList = false, bool isChecked = false, bool sessionUpdate = true, NIMMessageThreadOption? messageThreadOption, int? quickCommentUpdateTime, bool isDeleted = false, Map<String, dynamic>? yidunAntiCheating, String? env, String? fromNickname, bool? isRemoteRead, String? yidunAntiSpamExt, String? yidunAntiSpamRes})
NIMChatroomMessage.fromMap(Map<String, dynamic> map)
factory

Properties

ackCount int
群消息已读回执的已读数
finalinherited
antiSpamOption NIMAntiSpamOption?
易盾反垃圾配置项
getter/setter pairinherited
attachmentStatus NIMMessageAttachmentStatus?
消息附件下载状态 仅针对收到的消息
getter/setter pairinherited
callbackExtension String?
第三方回调回来的自定义扩展字段
finalinherited
clientAntiSpam bool
命中了客户端反垃圾,服务器处理
getter/setter pairinherited
config NIMCustomMessageConfig?
消息配置
getter/setter pairinherited
content String?
消息文本 消息中除 IMMessageType.textIMMessageType.tip 外,其他消息 text 字段都为 null
getter/setter pairinherited
enableHistory bool
该消息是否要保存到服务器
getter/setter pair
env String?
环境变量 用于指向不同的抄送,第三方回调等配置 注意:数据库不会保存此字段
getter/setter pairinherited
extension NIMChatroomMessageExtension?
消息扩展
getter/setter pair
fromAccount String?
消息发送方帐号
getter/setter pairinherited
fromNickname String?
消息发送方昵称
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hasSendAck bool
是否已经发送过群消息已读回执
finalinherited
isChecked bool
消息的选中状态
getter/setter pairinherited
isDeleted bool
消息是否标记为已删除 已删除的消息在获取本地消息列表时会被过滤掉,只有根据 messageId 获取消息的接口可能会返回已删除消息。聊天室消息里,此字段无效。
finalinherited
isHighPriorityMessage bool
是否是高优先级消息
getter/setter pair
isInBlackList bool
发送消息给对方, 是不是被对方拉黑了(消息本身是发送成功的)
finalinherited
isRemoteRead bool?
判断自己发送的消息对方是否已读 只有当当前消息为 NIMSessionType.p2p 消息且 NIMMessageDirection.outgoingtrue
getter/setter pairinherited
localExtension Map<String, dynamic>?
本地扩展字段(仅本地有效)
getter/setter pairinherited
memberPushOption NIMMemberPushOption?
指定成员推送选项
getter/setter pairinherited
messageAck bool
是否需要消息已读(主要针对群消息)
getter/setter pairinherited
messageAttachment NIMMessageAttachment?
消息附件内容
getter/setter pairinherited
messageDirection NIMMessageDirection
发送消息或者接收到消息
getter/setter pairinherited
messageId String?
消息ID,唯一标识
finalinherited
messageSubType int?
消息子类型,小于等于0表示没有子类型
getter/setter pairinherited
messageThreadOption NIMMessageThreadOption?
消息的thread信息
getter/setter pairinherited
messageType NIMMessageType
消息类型
finalinherited
pushContent String?
消息推送文案,长度限制200字节
getter/setter pairinherited
pushPayload Map<String, dynamic>?
消息推送Payload @discussion iOS 上支持字段参考苹果技术文档,长度限制 2K,撤回消息时该字段无效
getter/setter pairinherited
quickCommentUpdateTime int?
快捷评论的最后更新时间 (SDK内部使用,不建议用户使用)
finalinherited
remoteExtension Map<String, dynamic>?
消息拓展字段 服务器下发的消息拓展字段,并不在本地做持久化,目前只有聊天室中的消息才有该字段
getter/setter pairinherited
robotInfo NIMMessageRobotInfo?
机器人消息
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
senderClientType NIMClientType?
发送者客户端类型
finalinherited
serverId int?
消息 ServerID
finalinherited
sessionId String?
会话ID,如果当前session为team,则sessionId为teamId,如果是P2P则为对方帐号
finalinherited
sessionType NIMSessionType?
会话类型,当前仅支持P2P,Team和Chatroom
finalinherited
sessionUpdate bool
消息是否需要刷新到session服务 只有消息存离线的情况下,才会判断该参数,默认:是
getter/setter pairinherited
status NIMMessageStatus?
消息状态
getter/setter pairinherited
timestamp int
消息发送时间 本地存储消息可以通过修改时间戳来调整其在会话列表中的位置,发完服务器的消息时间戳将被服务器自动修正
finalinherited
unAckCount int
群消息已读回执的未读数
finalinherited
uuid String?
消息UUID
finalinherited
yidunAntiCheating Map<String, dynamic>?
易盾反垃圾增强反作弊专属字段
getter/setter pairinherited
yidunAntiSpamExt String?
易盾反垃圾扩展字段,为 json
getter/setter pairinherited
yidunAntiSpamRes String?
易盾反垃圾返回的结果
getter/setter pairinherited

Methods

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

Operators

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