JCSDK Objective-C API Reference for iOS/macOS  2.5.1
属性 | 所有成员列表
JCMessageChannelItem类 参考

属性

NSString * messageId
 
NSString * messageType
 
NSString * text
 
NSString * fileUri
 
NSString * thumbUri
 
int fileSize
 
int duration
 
NSDictionary * extraParams
 
NSString * userId
 
NSString * displayName
 
NSString * groupId
 
long time
 
long sentTime
 
JCMessageChannelItemDirection direction
 
JCMessageChannelType type
 
JCMessageChannelItemState state
 
JCMessageChannelReason error
 
long serverMessageId
 
id cookie
 
NSString * serverUid
 
NSString * senderUid
 
bool atMe
 
bool atAll
 
NSArray< NSString * > * atServerUidList
 
bool isWithdrawal
 
long withdrawalMessageId
 

详细描述

IM消息对象类

属性说明

◆ atAll

- (bool) atAll
readwritenonatomicassign

是否@所有人,针对群聊

  • true: @所有人
  • false: 未@所有人

◆ atMe

- (bool) atMe
readwritenonatomicassign

是否@我的,针对群聊

  • true: @我
  • false: 未@我

◆ atServerUidList

- (NSArray<NSString*>*) atServerUidList
readwritenonatomicstrong

@的uid列表

◆ cookie

- (id) cookie
readwritenonatomicstrong

cookie

◆ direction

- (JCMessageChannelItemDirection) direction
readnonatomicassign

消息传输方向,参见:

◆ displayName

- (NSString*) displayName
readnonatomiccopy

消息对端昵称

◆ duration

- (int) duration
readnonatomicassign

文件时长

注解
语音,视频消息有效

◆ error

- (JCMessageChannelReason) error
readnonatomicassign

消息错误码

当消息状态为 JCMessageChannelItemStateFail 时有效

◆ extraParams

- (NSDictionary*) extraParams
readnonatomicstrong

自定义参数集

◆ fileSize

- (int) fileSize
readnonatomicassign

文件大小

◆ fileUri

- (NSString*) fileUri
readnonatomiccopy

文件链接

可以通过 JCStorage 将文件上传至 Juphoon Cloud 平台来获取该地址,也可以从其他文件消息获取改地址

◆ groupId

- (NSString*) groupId
readnonatomiccopy

群组标识,type 为 JCMessageChannelTypeGroup 时有效

◆ isWithdrawal

- (bool) isWithdrawal
readwritenonatomicassign

是否是撤回消息

  • true: 是撤回消息
  • false: 不是撤回消息

◆ messageId

- (NSString*) messageId
readnonatomiccopy

消息唯一标识

◆ messageType

- (NSString*) messageType
readnonatomiccopy

消息内容类型

◆ senderUid

- (NSString*) senderUid
readwritenonatomicstrong

消息发送者 uid

◆ sentTime

- (long) sentTime
readnonatomicassign

发送成功时间,单位毫秒,如果是收到消息则是服务器记录的该消息发送时间

◆ serverMessageId

- (long) serverMessageId
readnonatomicassign

消息的服务器id

◆ serverUid

- (NSString*) serverUid
readwritenonatomicstrong

会话 serverUid

◆ state

- (JCMessageChannelItemState) state
readnonatomicassign

◆ text

- (NSString*) text
readnonatomiccopy

消息内容

包括文本和自定义消息体内容

◆ thumbUri

- (NSString*) thumbUri
readnonatomiccopy

缩略图链接

可以通过 JCStorage 将文件上传至 Juphoon Cloud 平台来获取该地址,也可以从其他文件消息获取改地址

◆ time

- (long) time
readnonatomicassign

发送或者接收时间,单位毫秒

◆ type

- (JCMessageChannelType) type
readnonatomicassign

返回是一对一消息还是群组消息

◆ userId

- (NSString*) userId
readnonatomiccopy

消息对端用户标识

◆ withdrawalMessageId

- (long) withdrawalMessageId
readwritenonatomicassign

撤回的消息id


该类的文档由以下文件生成: