Skip to content

Commit

Permalink
Merge pull request #34631 from dukenv0307/fix/34352
Browse files Browse the repository at this point in the history
Update correct last message text in optimistic data when deleting a message
  • Loading branch information
AndrewGable authored Jan 22, 2024
2 parents f3111a4 + 5150316 commit 0c5db5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ function getLastVisibleMessage(reportID: string, actionsToMerge: ReportActions =

let messageText = message?.text ?? '';
if (messageText) {
messageText = String(messageText).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();
messageText = String(messageText).replace(CONST.REGEX.LINE_BREAK, ' ').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();
}
return {
lastMessageText: messageText,
Expand Down

0 comments on commit 0c5db5f

Please sign in to comment.