Skip to main content

Message Reply with Quote

IMKit supports message reply with quote functionality, allowing users to reply to each other's messages in the chat UI. The replied messages will appear in the conversation list component of the chat UI. By default, this feature sends messages containing the quoted message content object RCReferenceMessage (type identifier: RC:ReferenceMsg).

alt(width=250) alt(width=250)

Limitations

The message reply with quote feature currently has the following restrictions:

  • Only supports quoting text messages, file messages, graphic messages, image messages, and quoted messages.
  • Supports only one level of quoting depth—you can only quote the original message. For nested quotes, only the immediately preceding quoted message content will be displayed.

Usage

The IMKit conversation UI enables message reply with quote by default. Users can long-press a message in the conversation UI, select Quote Message from the pop-up menu to quote it. After adding content in the input area, the SDK automatically combines the input content with the quoted message into an RCReferenceMessage and sends it to the conversation.

Customization

Customizing the UI for Quoted Messages

IMKit generates and sends quoted messages (RC:ReferenceMsg) by default, which are displayed in the message list using the RCReferenceMessageCell template.

All message templates in IMKit inherit from RCMessageCell. Custom message cells must also inherit from RCMessageCell. For details, see Modifying Message Display Styles.

Disabling Message Reply with Quote

You can globally disable this feature through configuration.

RCKitConfigCenter.message.enableMessageReference = NO;