NIMLocalAntiSpamResult class

本地反垃圾检测结果 反垃圾词库由开发者在云信后台管理配置,SDK 内负责下载并管理这个词库。垃圾词汇命中后支持三种替换规则:

客户端替换:将命中反垃圾的词语替换成指定的文本,再将替换后的消息发送给服务器

客户端拦截:命中后,开发者不应发送此消息

服务器处理:开发者将消息相应属性配置为已命中服务端拦截库,再将消息发送给服务器(发送者能看到该消息发送,但是云信服务器不会投递该消息,接收者不会收到该消息),配置方法请见下文描述。

Constructors

NIMLocalAntiSpamResult(int operator, String? content)
NIMLocalAntiSpamResult.fromMap(Map<String, dynamic> map)
factory

Properties

content String?
将垃圾词替换后的文本,只有当类型为客户端替换时才有效
final
hashCode int
The hash code for this object.
no setterinherited
operator int
命中的垃圾词操作类型,0:未命中;1:客户端替换;2:客户端拦截;3:服务器拦截;
final
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

Constants

clientIntercept → const int
客户端拦截。 命中后,开发者不应发送此消息
clientReplace → const int
客户端替换。 将命中反垃圾的词语替换成指定的文本,再将替换后的消息发送给服务器
pass → const int
未命中
serverIntercept → const int
服务端拦截。 开发者将消息相应属性配置为已命中服务端拦截库,再将消息发送给服务器(发送者能看到该消息发送,但是云信服务器不会投递该消息,接收者不会收到该消息)