Quote reply
Message threading is a feature that allows users to reply to each other's messages in a channel. Users can ask questions, give feedback or add context to a specific message without interrupting the conversation flow. A message thread refers to a group of messages and their replies. Sendbird Chat UIKit for React Native currently only supports quote reply that allows users to exchange and view both non-reply messages and replies in one channel view.
Limitations
Quote reply currently has the following limitations:
- UIKit message threading is available for group channels and supergroup channels only.
- Sendbird UIKit only supports 1-depth threads, meaning you can only reply to the original message.
How to use
To turn on quote reply mode, set the reply type to quote_reply
:
Reply to messages
In a group channel, the messageListComponent of GroupChannelModule
allows users to tap and hold the message they wish to reply to. A Message menu will appear and once they tap Reply, they can start quote replying using the reply
mode of the Input
component. A message that already has a reply is called a quoted message and the replied message is called a reply. Both quoted messages and replies can be in the form of a user message or file message.
The Message menu contains an Emoji reaction bar, a Copy button, and a Reply button. To view the menu, long tap on a message in channel view. Then, tap Reply in the menu to quote reply to the selected message. The onPressSendUserMessage()
method of GroupChannelFragment
is invoked and the selected message becomes a quoted message.
The Reply button of a message that's already a reply appears as deactivated because the Chat UIKit only supports 1-depth replies.
The Delete button of a quoted message that has one or more replies appears as deactivated. To delete the quoted message, its replies must be deleted first.
Customize the quote reply UI
The UI for quote reply can be customized through the string resource, color resource and icon resource.
String resource
The following table shows customizable properties of StringSet
.
Category | Property | Description |
---|---|---|
LABELS | REPLY_FROM_SENDER_TO_RECEIVER | A text indicating that who has replied to whose message. |
LABELS | CHANNEL_MESSAGE_REPLY | A reply text on the message menu. |
LABELS | CHANNEL_INPUT_PLACEHOLDER_REPLY | A placeholder text for the input field when replying. |
LABELS | CHANNEL_INPUT_REPLY_PREVIEW_TITLE | A preview of title text for the message that's being replied to. |
LABELS | CHANNEL_INPUT_REPLY_PREVIEW_BODY | A preview of body text for the message that's being replied to. |
TOAST | FIND_PARENT_MSG_ERROR | An error message shown when a message is selected to see the parent message, but the parent message couldn't be found. |
Icon resource
The following table shows customizable reaction icons.
Icon | Image | Description |
---|---|---|
reply | An icon used to indicate that a user replied to another user’s message in a channel. |