File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5427,7 +5427,7 @@ function changeReportPolicy(reportID: string, policyID: string) {
54275427 if ( reportToMove ?. parentReportID && reportToMove ?. parentReportActionID ) {
54285428 const workspaceChatReportID = reportToMove . parentReportID ;
54295429 const reportPreviewActionID = reportToMove . parentReportActionID ;
5430- const oldReportPreviewAction = allReportActions ?. [ ` ${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ workspaceChatReportID } ` ] ?. [ reportPreviewActionID ] ;
5430+ const oldReportPreviewAction = allReportActions ?. [ workspaceChatReportID ] ?. [ reportPreviewActionID ] ;
54315431 const deletedTime = DateUtils . getDBTime ( ) ;
54325432 const firstMessage = Array . isArray ( oldReportPreviewAction ?. message ) ? oldReportPreviewAction . message . at ( 0 ) : null ;
54335433 const updatedReportPreviewAction = {
@@ -5459,7 +5459,14 @@ function changeReportPolicy(reportID: string, policyID: string) {
54595459 failureData . push ( {
54605460 onyxMethod : Onyx . METHOD . MERGE ,
54615461 key : `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ workspaceChatReportID } ` ,
5462- value : { [ reportPreviewActionID ] : oldReportPreviewAction } ,
5462+ value : {
5463+ [ reportPreviewActionID ] : {
5464+ ...oldReportPreviewAction ,
5465+ originalMessage : {
5466+ deleted : null ,
5467+ } ,
5468+ } ,
5469+ } ,
54635470 } ) ;
54645471
54655472 // Update the expense chat report
You can’t perform that action at this time.
0 commit comments