SDKsReact Native
Create quote message
Construct a reply message referencing an original message using the OpenIM React Native SDK.
Construct a reply message referencing an original message:
const message = await OpenIMSDK.createQuoteMessage({
text: 'I agree with this proposal.',
message: originalMessage,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text content of the reply. |
message | MessageItem | Yes | Complete MessageItem object of the original message being referenced. |
Return value
A resolved Promise returns the initialized MessageItem object with quoted message attributes stored in quoteElem.
This method builds the message structure strictly in client memory; it does not dispatch messages to the server or trigger lifecycle events. After initialization, invoke Send message to deliver it to a conversation. When displaying replies, ensure the UI gracefully handles cases where the referenced message has been revoked or deleted. To attach rich text entities alongside a quote, see Create rich-text quote message.
Was this page helpful?