Skip to content

Commit 26ae296

Browse files
authored
Merge pull request Expensify#63433 from nkdengineer/fix/63276
Report-Report is not shown in WS chat online after trying to move it to deleted WS offline
2 parents 1b36a6a + 963eb94 commit 26ae296

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/libs/actions/Report.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5440,7 +5440,7 @@ function changeReportPolicy(reportID: string, policyID: string) {
54405440
if (reportToMove?.parentReportID && reportToMove?.parentReportActionID) {
54415441
const workspaceChatReportID = reportToMove.parentReportID;
54425442
const reportPreviewActionID = reportToMove.parentReportActionID;
5443-
const oldReportPreviewAction = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${workspaceChatReportID}`]?.[reportPreviewActionID];
5443+
const oldReportPreviewAction = allReportActions?.[workspaceChatReportID]?.[reportPreviewActionID];
54445444
const deletedTime = DateUtils.getDBTime();
54455445
const firstMessage = Array.isArray(oldReportPreviewAction?.message) ? oldReportPreviewAction.message.at(0) : null;
54465446
const updatedReportPreviewAction = {
@@ -5472,7 +5472,14 @@ function changeReportPolicy(reportID: string, policyID: string) {
54725472
failureData.push({
54735473
onyxMethod: Onyx.METHOD.MERGE,
54745474
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${workspaceChatReportID}`,
5475-
value: {[reportPreviewActionID]: oldReportPreviewAction},
5475+
value: {
5476+
[reportPreviewActionID]: {
5477+
...oldReportPreviewAction,
5478+
originalMessage: {
5479+
deleted: null,
5480+
},
5481+
},
5482+
},
54765483
});
54775484

54785485
// Update the expense chat report

0 commit comments

Comments
 (0)