SDKsiOS
Create a merged message
Create a merged message forward with OpenIM iOS SDK.
Invoke createMergeMessage:title:summaryList: on OIMMessageInfo to package multiple historical messages into a single merged forward card message:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
messageList | NSArray<OIMMessageInfo *> * | Yes | Array of historical message objects to be bundled together. |
title | NSString * | Yes | Title displayed on the outer bubble of the merged message card (e.g. Chat History). |
summaryList | NSArray<NSString *> * | Yes | Preview summary snippets displayed in the merged card body. |
Code example
OIMMessageInfo *message =
[OIMMessageInfo createMergeMessage:selectedMessages
title:@"Chat History"
summaryList:summaries];Return value
Returns an initialized OIMMessageInfo model with its content type set to merged message.
State changes after the call
- Local memory instantiation: This method builds an in-memory message model and does not mutate any of the bundled source messages.
- Subsequent dispatch: Call Send a message to deliver the merged forward card.
Was this page helpful?