Threads can be disabled using these steps -
1. Disable replies, reactions, etc. from the dashboard. (Application -> Chat -> Chat Overview) Please refer to the screenshot below. This is required so that the API permissions are correctly updated.
2. Followed by removing the Thread Component.
React example -
Remove the Thread
component from this piece of code under src/App.js
render() {
return (
<Chat client={this.chatClient} style={theme}>
<ChannelList
List={ChannelListMessenger}
Preview={ChannelPreviewMessenger}
filters={filters}
sort={sort}
options={options}
Paginator={Paginator}
/>
<Channel>
<Window>
<ChannelHeader />
<MessageList />
<MessageInput Input={MessageInputSmall} focus />
</Window>
//can be removed
<Thread Message={MessageText} MessageTimestamp={this.props} />
</Channel>
</Chat>
);
}
}
3. You can choose to hide the "Reply" button in the UI - This can be achieved by removing the MessageCommerce component
OR
Alternatively, you can achieve this by removing the MessageInput component after disabling the dashboard settings. All of this helps to achieve the disabling of thread.
Comments
0 comments
Please sign in to leave a comment.