Reply to a Message
In addition to creating top-level messages, Amity Chat SDK also allows you to reply to existing messages. To reply to a message, you'll need to specify the parent message's parentMessageId as one of the parameters. This allows the SDK to associate the new message as a reply to the parent comment.
Similar to creating a top-level message, you can use the SDK's optimistic creation feature to create a reply message.
Version 6
Version 5 (Maintained)
Version 6
Version 5 (Maintained)
import { MessageRepository } from '@amityco/js-sdk'
const message = { ... };
MessageRepository.createTextMessage({
channelId: 'channelId',
text: 'reply message',
parentId: message.messageId
});Version 6
Beta (v0.0.1)
Last updated
Was this helpful?