Browse SDKs · React Native
SDKsReact Native

Create a reply message

OpenIM React Native SDK guide for create a reply message.

Copy

Use createQuoteMessage() to create a reply message with the complete original message object.

const message = await OpenIMSDK.createQuoteMessage({
  text: 'I agree with this approach.',
  message: originalMessage,
});

Parameters

ParameterTypeRequiredDescription
textstringYesReply text.
messageMessageItemYesOriginal message being replied to.

The call returns a new MessageItem ready to send. When rendering replies, handle the case where the original message has been deleted or cannot be displayed.