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

(cherry picked from commit b2c28ac)
  • Loading branch information
francoisl authored and OSBotify committed Apr 18, 2023
1 parent 0d5398a commit ea11e4f
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 @@ -924,11 +924,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 ea11e4f

Please sign in to comment.