NIMSDK-iOS
载入中...
搜索中...
未找到
NIMQChatMessage类 参考

#import <NIMQChatMessage.h>

类 NIMQChatMessage 继承关系图:

属性

NIMMessageType messageType
 
NIMSessionsession
 
NSString * messageId
 
NSString * serverID
 
NSString * text
 
id< NIMMessageObjectmessageObject
 
NSString * rawAttachContent
 
NIMMessageSettingsetting
 
NSString * apnsContent
 
NSDictionary * apnsPayload
 
NSDictionary * remoteExt
 
NSDictionary * localExt
 
NSTimeInterval timestamp
 
NIMMessageDeliveryState deliveryState
 
NIMMessageAttachmentDownloadState attachmentDownloadState
 
BOOL isReceivedMsg
 
BOOL isOutgoingMsg
 
BOOL isDeleted
 
BOOL isRevoked
 
NIMQChatMessageStatus status
 
NSString * from
 
NSString * senderName
 
NIMLoginClientType senderClientType
 
unsigned long long qchatChannelId
 
unsigned long long qchatServerId
 
BOOL mentionedAll
 
NSArray< NSString * > * mentionedAccids
 
NSArray< NSNumber * > * mentionedRoleidList
 
NSTimeInterval updateTimestamp
 
NSString * env
 
NIMQChatMessageReferreplyRefer
 
NIMQChatMessageReferthreadRefer
 
BOOL fromCache
 
NIMQChatMessageAntispamSettingyidunAntiSpamSetting
 
NIMQChatMessageAntispamResultyidunAntiSpamResult
 
NSString * callbackExt
 
NIMQChatMessageUpdateContentupdateContent
 
NIMQChatMessageUpdateOperatorInfoupdateOperatorInfo
 
NSNumber * subType
 

详细描述

消息结构

属性说明

◆ apnsContent

- (NSString*) apnsContent
readwritenonatomiccopy

消息推送文案,长度限制500字,撤回消息时该字段无效

◆ apnsPayload

- (NSDictionary*) apnsPayload
readwritenonatomiccopy

消息推送Payload @discussion 可以通过这个字段定义消息推送 Payload ,支持字段参考苹果技术文档,长度限制 2K,撤回消息时该字段无效

◆ attachmentDownloadState

- (NIMMessageAttachmentDownloadState) attachmentDownloadState
readnonatomicassign

消息附件下载状态 仅针对收到的消息

◆ callbackExt

- (NSString*) callbackExt
readnonatomiccopy

第三方回调回来的自定义扩展字段

◆ deliveryState

- (NIMMessageDeliveryState) deliveryState
readnonatomicassign

消息投递状态 仅针对发送的消息

◆ env

- (NSString*) env
readwritenonatomiccopy

环境变量 @discussion 环境变量,用于指向不同的抄送、第三方回调等配置

◆ from

- (NSString*) from
readwritenonatomiccopy

消息来源

◆ fromCache

- (BOOL) fromCache
readnonatomicassign

是否来自缓存 @discussion

◆ isDeleted

- (BOOL) isDeleted
readnonatomicassign

消息是否标记为已删除 @discussion

◆ isOutgoingMsg

- (BOOL) isOutgoingMsg
readnonatomicassign

是否是往外发的消息 @discussion

◆ isReceivedMsg

- (BOOL) isReceivedMsg
readnonatomicassign

是否是收到的消息 @discussion

◆ isRevoked

- (BOOL) isRevoked
readnonatomicassign

消息是否标记为已撤回 @discussion

◆ localExt

- (NSDictionary*) localExt
readwritenonatomiccopy

客户端本地扩展 @discussion 客户端可以设置这个字段,这个字段只在本地存储,不会发送至对端,上层需要保证 NSDictionary 可以转换为 JSON

◆ mentionedAccids

- (NSArray<NSString *>*) mentionedAccids
readwritenonatomiccopy

被艾特的人的accid列表 @discussion

◆ mentionedAll

- (BOOL) mentionedAll
readwritenonatomicassign

是否艾特所有人 @discussion

◆ mentionedRoleidList

- (NSArray<NSNumber *>*) mentionedRoleidList
readwritenonatomiccopy

被艾特的身份组的ID列表 @discussion

◆ messageId

- (NSString*) messageId
readnonatomiccopy

消息ID,唯一标识

◆ messageObject

- (id<NIMMessageObject>) messageObject
readwritenonatomicstrong

消息附件内容

◆ messageType

- (NIMMessageType) messageType
readnonatomicassign

消息类型

◆ qchatChannelId

- (unsigned long long) qchatChannelId
readnonatomicassign

圈组频道ID

◆ qchatServerId

- (unsigned long long) qchatServerId
readnonatomicassign

圈组服务器ID

◆ rawAttachContent

- (NSString*) rawAttachContent
readnonatomiccopy

消息附件原始字符串内容

◆ remoteExt

- (NSDictionary*) remoteExt
readwritenonatomiccopy

服务器扩展 @discussion 客户端可以设置这个字段,这个字段将在本地存储且发送至对端,上层需要保证 NSDictionary 可以转换为 JSON,长度限制 1K

◆ replyRefer

- (NIMQChatMessageRefer*) replyRefer
readnonatomiccopy

回复消息引用 @discussion

◆ senderClientType

- (NIMLoginClientType) senderClientType
readnonatomicassign

发送者客户端类型

◆ senderName

- (NSString*) senderName
readnonatomiccopy

消息发送者名字 @discussion

◆ serverID

- (NSString*) serverID
readnonatomiccopy

消息服务端ID

◆ session

- (NIMSession*) session
readnonatomiccopy

消息所属会话

◆ setting

- (NIMMessageSetting*) setting
readwritenonatomicstrong

消息设置 @discussion 可以通过这个字段制定当前消息的各种设置

◆ status

- (NIMQChatMessageStatus) status
readwritenonatomicassign

消息处理状态

◆ subType

- (NSNumber*) subType
readwritenonatomicstrong

消息子类型, 大于0的int NSNumber包装值

◆ text

- (NSString*) text
readwritenonatomiccopy

消息文本 @discussion 所有消息类型都支持

◆ threadRefer

- (NIMQChatMessageRefer*) threadRefer
readnonatomiccopy

thread消息引用 @discussion

◆ timestamp

- (NSTimeInterval) timestamp
readwritenonatomicassign

消息发送时间 @discussion 发送成功后将被服务器自动修正

◆ updateContent

- (NIMQChatMessageUpdateContent*) updateContent
readwritenonatomicstrong

消息更新内容 @discussion 如果是更新的消息,里面有具体更新内容

◆ updateOperatorInfo

- (NIMQChatMessageUpdateOperatorInfo*) updateOperatorInfo
readwritenonatomicstrong

消息更新操作信息 @discussion 如果是更新的消息,里面有具体操作信息

◆ updateTimestamp

- (NSTimeInterval) updateTimestamp
readwritenonatomicassign

消息更新时间 @discussion

◆ yidunAntiSpamResult

- (NIMQChatMessageAntispamResult*) yidunAntiSpamResult
readwritenonatomiccopy

易盾反垃圾返回的结果字段

◆ yidunAntiSpamSetting

- (NIMQChatMessageAntispamSetting*) yidunAntiSpamSetting
readwritenonatomiccopy

易盾反垃圾设置


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