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.
V2TIMMergerElem

Instance Methods

(void) - downloadMergerMessage:fail:
 
(V2TIMElem *) - nextElem
 
(void) - appendElem:
 

Properties

BOOL layersOverLimit
 
NSString * title
 
NSArray< NSString * > * abstractList
 

Method Documentation

◆ downloadMergerMessage:fail:()

- (void) downloadMergerMessage: (V2TIMMessageListSucc)  succ
fail: (V2TIMFail)  fail 

Download the list of messages combined.

◆ nextElem()

- (V2TIMElem *) nextElem

Get the next Elem. If your message has multiple Elems, you can get the next Elem object from the current Elem. If the return value is nil, it means the Elem acquisition is over. For detailed usage, please refer to the document Message sending and receiving

◆ appendElem:()

- (void) appendElem: (V2TIMElem *)  elem

Add the next element
To configure multiple elements, you can add the next element via the element of a Message object after creating the Message object. The following is the sample code for creating V2TIMTextElem and V2TIMCustomElem elements:

    V2TIMMessage *msg = [[V2TIMManager sharedInstance] createTextMessage:"text"];
    V2TIMCustomElem *customElem = [[V2TIMCustomElem alloc] init];
    customElem.data = ["自定义消息" dataUsingEncoding:NSUTF8StringEncoding];
    [msg.textElem appendElem:customElem];
Attention
  • This API can be called only by elements of a Message object created via createMessage.
  • This API can be used to add elements only of the V2TIMTextElem, V2TIMCustomElem, V2TIMFaceElem, and V2TIMLocationElem types.

Property Documentation

◆ layersOverLimit

- (BOOL) layersOverLimit
readnonatomicassign

When a combined message also contains combined messages, we call the situation combination nesting. The number of combination nesting levels cannot exceed 100. If the limit is exceeded, layersOverLimit will return true, title and abstractList will return an empty string, and downloadMergerMessage will return the ERR_MERGER_MSG_LAYERS_OVER_LIMIT error code.

◆ title

- (NSString*) title
readnonatomicstrong

Title of a combined message.

◆ abstractList

- (NSArray<NSString *>*) abstractList
readnonatomicstrong

Abstract list of the combined message.