SDKsReact Native
Create rich-text quote message
Construct a rich-text reply message with text entities and referenced original message using the OpenIM React Native SDK.
Construct a rich-text reply message that references an original message and supports embedded entities:
const message = await OpenIMSDK.createAdvancedQuoteMessage({
text: 'I have reviewed the related link.',
message: originalMessage,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Raw text content of the reply. |
message | MessageItem | Yes | Original referenced message object being quoted. |
messageEntityList | MessageEntity[] | No | Array of custom text entities such as URLs or highlighted text segments. |
Each MessageEntity specifies type, offset, and length, with optional url or info metadata.
Return value
A resolved Promise returns the initialized MessageItem object with quoting details populated in quoteElem.
This method constructs the message object locally in memory; it does not send network requests to the server or trigger message events. After creating the message, invoke Send message to dispatch it to a conversation.
Was this page helpful?