ContentType 枚举(iOS IMLib)

消息内容类型枚举:共 9 个取值,定义来自 domain.json → enums.ContentType。

基本信息​

项值
枚举ContentType
取值数9
本平台常量名IMPContentType
IDL 来源domain.json → enums.ContentType
跨端一致性取值跨端一致;常量名与成员名按平台绑定
平台状态已交付

枚举常量摘要​

取值序号说明
text0文本消息
image1图片消息
file2文件消息
voice3语音消息
location4位置消息
custom5自定义消息(data 任意 JSON 透传)
recall6撤回占位消息(服务端生成,客户端只读)
system7系统通知消息
combine8—

使用说明​

MessageContent.type 的取值;发送时按 type 校验必填字段,未知类型按 custom 透传。

示例​

Swift
let value: IMPContentType = IMPContentType.text

相关链接​