Browse SDKs · WASM
SDKsWASM

Create a merged forward message

Create a merged forward message with the WASM SDK.

Copy

Parameters

ParameterTypeRequiredDescription
messageListMessageItem[]YesList of sent messages to merge.
titlestringYesTitle displayed on the merged message card.
summaryListstring[]YesSummary lines displayed on the card.
const { data: message } = await openimsdk.createMergerMessage({
  messageList: selectedMessages,
  title: 'Project discussion history',
  summaryList: selectedMessages.slice(0, 4).map(buildSummary),
});

When the Promise resolves, it returns only a new pending message object and does not modify the original messages. Make sure summaries do not expose content that should not be displayed, and provide fallback text for message types that cannot be parsed.