IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMMessage

Properties

NSString * msgID
 
NSDate * timestamp
 
NSString * sender
 
NSString * nickName
 
NSString * friendRemark
 
NSString * nameCard
 
NSString * faceURL
 
NSString * groupID
 
NSString * userID
 
uint64_t seq
 
uint64_t random
 
V2TIMMessageStatus status
 
BOOL isSelf
 
BOOL isRead
 
BOOL isPeerRead
 
NSMutableArray< NSString * > * groupAtUserList
 
V2TIMElemType elemType
 
V2TIMTextElemtextElem
 
V2TIMCustomElemcustomElem
 
V2TIMImageElemimageElem
 
V2TIMSoundElemsoundElem
 
V2TIMVideoElemvideoElem
 
V2TIMFileElemfileElem
 
V2TIMLocationElemlocationElem
 
V2TIMFaceElemfaceElem
 
V2TIMMergerElemmergerElem
 
V2TIMGroupTipsElemgroupTipsElem
 
NSData * localCustomData
 
int localCustomInt
 
NSData * cloudCustomData
 
BOOL isExcludedFromUnreadCount
 
BOOL isExcludedFromLastMessage
 
V2TIMOfflinePushInfoofflinePushInfo
 

Property Documentation

◆ msgID

- (NSString*) msgID
readnonatomicstrong

Message ID.

◆ timestamp

- (NSDate*) timestamp
readnonatomicstrong

Message timestamp.

◆ sender

- (NSString*) sender
readnonatomicstrong

Sender's userID.

◆ nickName

- (NSString*) nickName
readnonatomicstrong

Sender's nickname.

◆ friendRemark

- (NSString*) friendRemark
readnonatomicstrong

Sender's friend remark. If you have not pulled the friend information or are not a friend, nil is returned.

◆ nameCard

- (NSString*) nameCard
readnonatomicstrong

For a group message, nameCard is the group name card of the sender.

◆ faceURL

- (NSString*) faceURL
readnonatomicstrong

Sender's profile photo URL.

◆ groupID

- (NSString*) groupID
readnonatomicstrong

For a group message, groupID is the message receiving group ID. Otherwise, groupID is null.

◆ userID

- (NSString*) userID
readnonatomicstrong

For a one-to-one message, userID is the conversation user ID. Otherwise, userID is null. Suppose you are chatting with userA, regardless of whether it is a message sent to userA by yourself or a message sent to yourself by userA, the userID here is userA.

◆ seq

- (uint64_t) seq
readnonatomicassign

Sequence number of the message Message sequence numbers in group chats are generated in the cloud and are strictly incremented and unique within the group. Message sequence numbers in one-to-one chats are generated locally and cannot be guaranteed to be strictly incremented and unique.

◆ random

- (uint64_t) random
readnonatomicassign

Random number of the message.

◆ status

- (V2TIMMessageStatus) status
readnonatomicassign

Message sending status.

◆ isSelf

- (BOOL) isSelf
readnonatomicassign

Whether the message sender is the current user.

◆ isRead

- (BOOL) isRead
readnonatomicassign

Whether the message is read by the current user.

◆ isPeerRead

- (BOOL) isPeerRead
readnonatomicassign

Whether the message is read by the peer party (valid only for one-to-one messages)

◆ groupAtUserList

- (NSMutableArray<NSString *>*) groupAtUserList
readnonatomicstrong

UserID list of users who has been @ in the group message.

◆ elemType

- (V2TIMElemType) elemType
readnonatomicassign

Message type.

◆ textElem

- (V2TIMTextElem*) textElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_TEXT, textElem stores the content of the text message.

◆ customElem

- (V2TIMCustomElem*) customElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_CUSTOM, customElem stores the content of the custom message.

◆ imageElem

- (V2TIMImageElem*) imageElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_IMAGE, imageElem stores the content of the image message.

◆ soundElem

- (V2TIMSoundElem*) soundElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_SOUND, soundElem stores the content of the voice message.

◆ videoElem

- (V2TIMVideoElem*) videoElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_VIDEO, videoElem stores the content of the video message.

◆ fileElem

- (V2TIMFileElem*) fileElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_FILE, fileElem stores the content of the file message.

◆ locationElem

- (V2TIMLocationElem*) locationElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_LOCATION, locationElem stores the content of the geographical location message.

◆ faceElem

- (V2TIMFaceElem*) faceElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_FACE, faceElem stores the content of the emoji message.

◆ mergerElem

- (V2TIMMergerElem*) mergerElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_MERGER, relayElem stores the content of the forward message.

◆ groupTipsElem

- (V2TIMGroupTipsElem*) groupTipsElem
readnonatomicstrong

If the message type is V2TIM_ELEM_TYPE_GROUP_TIPS, groupTipsElem stores the content of the group tip message.

◆ localCustomData

- (NSData*) localCustomData
readwritenonatomicstrong

Local custom message data (saved locally, will not be sent to the peer end, and will become invalid after the app is uninstalled and reinstalled)

◆ localCustomInt

- (int) localCustomInt
readwritenonatomicassign

Local custom message data (saved locally, will not be sent to the peer end, and will become invalid after the app is uninstalled and reinstalled)

◆ cloudCustomData

- (NSData*) cloudCustomData
readwritenonatomicstrong

Cloud custom data (saved in the cloud, will be sent to the peer end, and can still be pulled after the app is uninstalled and reinstalled)

◆ isExcludedFromUnreadCount

- (BOOL) isExcludedFromUnreadCount
readwritenonatomicassign

Whether the message is excluded from the conversation unread message count. NO (default): included in the unread message count of the conversation; YES: excluded from the conversation unread message count

Supported only in 5.3.425 and later versions.

◆ isExcludedFromLastMessage

- (BOOL) isExcludedFromLastMessage
readwritenonatomicassign

Whether the message is excluded from the conversation lastMessage. NO (default): included in the conversation lastMessage; YES: excluded from the conversation lastMessage Supported only in 5.4.666 and later versions.

◆ offlinePushInfo

- (V2TIMOfflinePushInfo*) offlinePushInfo
readnonatomicstrong

Offline push information of the message.