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

Public Member Functions

boolean isLayersOverLimit ()
 
String getTitle ()
 
List< String > getAbstractList ()
 
void downloadMergerMessage (final V2TIMValueCallback< List< V2TIMMessage >> callback)
 
String toString ()
 
V2TIMElem getNextElem ()
 
void appendElem (V2TIMElem v2TIMElem)
 

Member Function Documentation

◆ isLayersOverLimit()

boolean isLayersOverLimit ( )
inline

If a combined message also contains combined messages, we call it nesting. There cannot be more than 100 nesting levels. If the limit is exceeded, layersOverLimit will return true, title and abstractList will return an empty string, and downloadMergerMessage will return the error code ERR_MERGER_MSG_LAYERS_OVER_LIMIT.

◆ getTitle()

String getTitle ( )
inline

Get the title of a combined message

◆ getAbstractList()

List<String> getAbstractList ( )
inline

Get the abstract list of a combined message

◆ downloadMergerMessage()

void downloadMergerMessage ( final V2TIMValueCallback< List< V2TIMMessage >>  callback)
inline

Download the list of messages combined

◆ toString()

String toString ( )
inline

◆ getNextElem()

V2TIMElem getNextElem ( )
inlineinherited

◆ appendElem()

void appendElem ( V2TIMElem  v2TIMElem)
inlineinherited

Add the next element

To configure multiple elements, after creating a Message object, you can add the next element via the element object of Message.

The following is the sample code for creating V2TIMTextElem and V2TIMCustomElem:

V2TIMMessage message = V2TIMManager.getMessageManager().createTextMessage("test");

V2TIMCustomElem customElem = new V2TIMCustomElem();

customElem.setData("Custom message".getBytes());

message.getTextElem().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 V2TIMTextElem, V2TIMCustomElem, V2TIMFaceElem, or V2TIMLocationElem.