NIMMessage Class Reference
| Inherits from | NSObject | 
|---|---|
| Declared in | NIMMessage.h | 
  messageType
	Message type
@property (nonatomic, assign, readonly) NIMMessageType messageTypeDiscussion
Message type
Declared In
NIMMessage.h
  messageSubType
	Message subtype (The default value is 0 The specified value must be greater than 0)
@property (nonatomic, assign) NSInteger messageSubTypeDiscussion
Message subtype (The default value is 0 The specified value must be greater than 0)
Declared In
NIMMessage.h
  from
	Message source
@property (nullable, nonatomic, copy) NSString *fromDiscussion
Message source
Declared In
NIMMessage.h
  session
	Session a message belongs to
@property (nullable, nonatomic, copy, readonly) NIMSession *sessionDiscussion
Session a message belongs to
Declared In
NIMMessage.h
  messageId
	Unique message identifier
@property (nonatomic, copy, readonly) NSString *messageIdDiscussion
Unique message identifier
Declared In
NIMMessage.h
  serverID
	Server ID
@property (nonatomic, copy, readonly) NSString *serverIDDiscussion
Server ID
Declared In
NIMMessage.h
  text
	Text message
@property (nullable, nonatomic, copy) NSString *textDiscussion
Text message
All text fields except NIMMessageTypeText and NIMMessageTypeTip are nil.
Declared In
NIMMessage.h
  messageObject
	Message attachment
@property (nullable, nonatomic, strong) id<NIMMessageObject> messageObjectDiscussion
Message attachment
Declared In
NIMMessage.h
  setting
	Message setting
@property (nullable, nonatomic, strong) NIMMessageSetting *settingDiscussion
Message setting
The field can be specified for settings, such as count as unread, and multi-device sync
Declared In
NIMMessage.h
  antiSpamOption
	Anti spam option
@property (nullable, nonatomic, strong) NIMAntiSpamOption *antiSpamOptionDiscussion
Anti spam option
Declared In
NIMMessage.h
  apnsContent
	Push notification content that can contain up to 500 characters. This field is invalid if the message is recalled
@property (nullable, nonatomic, copy) NSString *apnsContentDiscussion
Push notification content that can contain up to 500 characters. This field is invalid if the message is recalled
Declared In
NIMMessage.h
  apnsPayload
	Push notification payload
@property (nullable, nonatomic, copy) NSDictionary *apnsPayloadDiscussion
Push notification payload
The field can contain a custom payload. For more information about supported fields, see the official Apple documentation on APNs. The payload can contain 2000 characters. This field is invalid if the message is recalled.
Declared In
NIMMessage.h
  apnsMemberOption
	Member option for APNs
@property (nullable, nonatomic, strong) NIMMessageApnsMemberOption *apnsMemberOptionDiscussion
Member option for APNs
This option is used for some complex push use cases. Currently the option is only available for group chats.
Declared In
NIMMessage.h
  remoteExt
	Server extension
@property (nullable, nonatomic, copy) NSDictionary *remoteExtDiscussion
Server extension
You can set this field on the client. This field will be stored locally and sent to the peer. The upper layer can convert NSDictionary to a JSON file. The length of the field is limited to 1000 characters
Declared In
NIMMessage.h
  localExt
	Local extension
@property (nullable, nonatomic, copy) NSDictionary *localExtDiscussion
Local extension
You can set this field on the client. This field will be stored locally and sent to the peer. The upper layer can convert NSDictionary to a JSON file.
Declared In
NIMMessage.h
  messageExt
	Message extension field
@property (nullable, nonatomic, strong) id messageExtDiscussion
Message extension field
The message extension field sent by the server is not persisted locally. Currently, only the messages in the chat room have this field (NIMMessageChatroomExtension)
Declared In
NIMMessage.h
  timestamp
	The time when a message is sent
@property (nonatomic, assign) NSTimeInterval timestampDiscussion
The time when a message is sent
The message stored locally can adjust its position in the session list by modifying the timestamp, and the timestamp of the message sent to the server will be automatically corrected by the server.
Declared In
NIMMessage.h
  yidunAntiCheating
	Fields for GuardEase anti-cheating
@property (nullable, nonatomic, copy) NSDictionary *yidunAntiCheatingDiscussion
Fields for GuardEase anti-cheating
The data in the fields for anti-cheating provided by GuardEase are transferred in pass-through mode
Declared In
NIMMessage.h
  yidunAntiSpamExt
	Extension field for GuardEase anti-spam in JSON format. 1024 characters are allowed.
@property (nullable, nonatomic, copy) NSString *yidunAntiSpamExtDiscussion
Extension field for GuardEase anti-spam in JSON format. 1024 characters are allowed.
Declared In
NIMMessage.h
  yidunAntiSpamRes
	The result returned by GuardEase
@property (nullable, nonatomic, copy) NSString *yidunAntiSpamResDiscussion
The result returned by GuardEase
Declared In
NIMMessage.h
  locationX
	X coordinate for chat room only
@property (nonatomic, copy) NSNumber *locationXDiscussion
X coordinate for chat room only
Declared In
NIMMessage.h
  locationY
	Y coordinate for chat room only
@property (nonatomic, copy) NSNumber *locationYDiscussion
Y coordinate for chat room only
Declared In
NIMMessage.h
  locationZ
	Z coordinate for chat room only
@property (nonatomic, copy) NSNumber *locationZDiscussion
Z coordinate for chat room only
Declared In
NIMMessage.h
  toAccIds
	List of recipients for chat room only
@property (nonatomic, copy) NSArray<NSString*> *toAccIdsDiscussion
List of recipients for chat room only
Declared In
NIMMessage.h
  notifyTargetTags
	the target tag expression
@property (nullable, nonatomic, copy) NSString *notifyTargetTagsDiscussion
the target tag expression
Declared In
NIMMessage.h
  env
	The environment variable
@property (nullable, nonatomic, copy) NSString *envDiscussion
The environment variable
The environment variable used to point to different types of configurations for state sync and third-party callbacks.
Declared In
NIMMessage.h
  deliveryState
	Message delivery state for delivered messages
@property (nonatomic, assign, readonly) NIMMessageDeliveryState deliveryStateDiscussion
Message delivery state for delivered messages
Declared In
NIMMessage.h
  attachmentDownloadState
	Message attachment download states for received messages
@property (nonatomic, assign, readonly) NIMMessageAttachmentDownloadState attachmentDownloadStateDiscussion
Message attachment download states for received messages
Declared In
NIMMessage.h
  isReceivedMsg
	Check if it is a received message
@property (nonatomic, assign, readonly) BOOL isReceivedMsgDiscussion
Check if it is a received message
Since roaming messages sent by the current user are still regarded as received messages. This field is used to evaluate whether the message needs to be resent or re-received when an error occurred
Declared In
NIMMessage.h
  isOutgoingMsg
	Check if it is an outgoing message
@property (nonatomic, assign, readonly) BOOL isOutgoingMsgDiscussion
Check if it is an outgoing message
Since you can send messages to yourself, not all messages from yourself are outgoing messages. This field is used to determine the layout position of the avatar (left or right).
Declared In
NIMMessage.h
  isPlayed
	Check whether the message has been played
@property (nonatomic, assign) BOOL isPlayedDiscussion
Check whether the message has been played
Editing the property will modify the data in the database. In chat room messages, this field is invalid.
Declared In
NIMMessage.h
  isDeleted
	Check whether the message is marked as deleted
@property (nonatomic, assign, readonly) BOOL isDeletedDiscussion
Check whether the message is marked as deleted
Deleted messages will be filtered out when getting the local message list, and only the interface that gets messages based on messageId may return deleted messages. In chat room messages, this field is invalid.
Declared In
NIMMessage.h
  isRemoteRead
	Check if a message is read by the peer
@property (nonatomic, assign, readonly) BOOL isRemoteReadDiscussion
Check if a message is read by the peer
The interface is valid only if the message is of P2P type and isOutgoingMsg is set to YES. The peer must call the interface to send a read receipt for the message.
Declared In
NIMMessage.h
  isTeamReceiptSended
	Read receipt of a message is sent in a group chat
@property (nonatomic, assign, readonly) BOOL isTeamReceiptSendedDiscussion
Read receipt of a message is sent in a group chat
the interface is only valid for group messages
Declared In
NIMMessage.h
  teamReceiptInfo
	Group read receipt
@property (nullable, nonatomic, strong, readonly) NIMTeamMessageReceipt *teamReceiptInfoDiscussion
Group read receipt
The interface is valid only if the message is of team type and teamReceiptEnabled is set to YES. The peer must call the interface to send a read receipt for a message.
Declared In
NIMMessage.h
  senderName
	/** Sender name * @discussion If the sender is the current user, this value may be empty. This value represents the sender’s nickname, not the one when the message was sent. In chat room messages, this field is invalid.
@property (nullable, nonatomic, copy, readonly) NSString *senderNameDiscussion
/** Sender name * @discussion If the sender is the current user, this value may be empty. This value represents the sender’s nickname, not the one when the message was sent. In chat room messages, this field is invalid.
Declared In
NIMMessage.h
  senderClientType
	Client type of a sender
@property (nonatomic, assign, readonly) NIMLoginClientType senderClientTypeDiscussion
Client type of a sender
Declared In
NIMMessage.h
  isBlackListed
	Check if the user is in the blacklist
@property (nonatomic, assign, readonly) BOOL isBlackListedDiscussion
Check if the user is in the blacklist
YES: in the blacklist
Declared In
NIMMessage.h
  repliedMessageId
	The message ID of the target message the message replies to
@property (nullable, nonatomic, copy, readonly) NSString *repliedMessageIdDiscussion
The message ID of the target message the message replies to
empty if no other message was replied to
Message A is a regular message and message B is a reply to message A. In this case, message A is the replied message and thread message of message B. In addition, message C is a reply to message B, then the replied message of message C is message B, and thread message of message C is message A.
Declared In
NIMMessage.h
  repliedMessageServerId
	The server ID of the target message the message replies to
@property (nullable, nonatomic, copy, readonly) NSString *repliedMessageServerIdDiscussion
The server ID of the target message the message replies to
empty if no other message was replied to
Declared In
NIMMessage.h
  repliedMessageFrom
	The sender of the target message the message replies to
@property (nullable, nonatomic, copy, readonly) NSString *repliedMessageFromDiscussion
The sender of the target message the message replies to
empty if no other message was replied to
Declared In
NIMMessage.h
  repliedMessageTo
	The recipient of the target message the message replies to
@property (nullable, nonatomic, copy, readonly) NSString *repliedMessageToDiscussion
The recipient of the target message the message replies to
empty if no other message was replied to
Declared In
NIMMessage.h
  threadMessageId
	The message ID of the parent message of the target message
@property (nullable, nonatomic, copy, readonly) NSString *threadMessageIdDiscussion
The message ID of the parent message of the target message
empty if no other message was replied to
Declared In
NIMMessage.h
  threadMessageServerId
	The server ID of the parent message
@property (nullable, nonatomic, copy, readonly) NSString *threadMessageServerIdDiscussion
The server ID of the parent message
empty if no other message was replied to
Declared In
NIMMessage.h
  threadMessageFrom
	The sender of the parent message
@property (nullable, nonatomic, copy, readonly) NSString *threadMessageFromDiscussion
The sender of the parent message
empty if no other message was replied to
Declared In
NIMMessage.h
  threadMessageTo
	The recipient of the target message the message replies to
@property (nullable, nonatomic, copy, readonly) NSString *threadMessageToDiscussion
The recipient of the target message the message replies to
empty if no other message was replied to
Declared In
NIMMessage.h
  callbackExt
	Custom extension field returned by a third party callback
@property (nonatomic, copy, readonly) NSString *callbackExtDiscussion
Custom extension field returned by a third party callback
Declared In
NIMMessage.h
  status
	Message status
@property (nonatomic, assign) NIMMessageStatus statusDiscussion
Message status
Declared In
NIMMessage.h