Skip to content

Commit

Permalink
Merge pull request #17586 from dukenv0307/fix/17212-not-update-edited…
Browse files Browse the repository at this point in the history
…-message-on-LHN-in-offline-mode
  • Loading branch information
francoisl authored Apr 18, 2023
2 parents f599146 + 56d466f commit b2c28ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,11 +921,10 @@ function editReportComment(reportID, originalReportAction, textForNewComment) {

const lastVisibleAction = ReportActionsUtils.getLastVisibleAction(reportID, optimisticReportActions);
if (reportActionID === lastVisibleAction.reportActionID) {
const reportComment = parser.htmlToText(htmlForNewComment);
const lastMessageText = ReportUtils.formatReportLastMessageText(reportComment);
const optimisticReport = {
lastMessageHtml: lodashGet(lastVisibleAction, 'message[0].html'),
lastMessageText: lodashGet(lastVisibleAction, 'message[0].text'),
lastVisibleActionCreated: lastVisibleAction.created,
lastActorEmail: lastVisibleAction.actorEmail,
lastMessageText: Str.htmlDecode(lastMessageText),
};
optimisticData.push({
onyxMethod: CONST.ONYX.METHOD.MERGE,
Expand Down

0 comments on commit b2c28ac

Please sign in to comment.