Skip to content

Commit

Permalink
Parse breaklines when editing multi-line message (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreytheCoder authored Apr 12, 2024
1 parent 789dea9 commit 4b1974c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react/src/components/ChatInput/ChatInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ const ChatInput = ({ scrollToBottom }) => {
}
setDisableButton(true);
} else {
const res = await RCInstance.updateMessage(editMessage._id, message);
const res = await RCInstance.updateMessage(
editMessage._id,
message.replace(/\n/g, '\\n')
);
if (!res.success) {
await RCInstance.logout();
setIsUserAuthenticated(false);
Expand Down

0 comments on commit 4b1974c

Please sign in to comment.