File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5500,7 +5500,8 @@ function resolveActionableMentionWhisper(
55005500 // the parent report's participants so the members list the user is viewing updates immediately.
55015501 // When parentReport is the same as the current report (e.g. viewing a transaction thread directly),
55025502 // fall back to the report's parentReportID to find the actual ancestor (IOU/expense/invoice report).
5503- let parentInviteData = isInviteResolution && parentReport ?. reportID && parentReport . reportID !== reportID ? buildParticipantsInviteData ( parentReport , inviteeAccountIDs ) : undefined ;
5503+ const isParentReportDifferent = ! ! parentReport ?. reportID && parentReport . reportID !== reportID ;
5504+ let parentInviteData = isInviteResolution && isParentReportDifferent ? buildParticipantsInviteData ( parentReport , inviteeAccountIDs ) : undefined ;
55045505 if ( ! parentInviteData && isInviteResolution && report ?. parentReportID && report . parentReportID !== reportID ) {
55055506 const ancestorReport = allReports ?. [ `${ ONYXKEYS . COLLECTION . REPORT } ${ report . parentReportID } ` ] ;
55065507 if ( ancestorReport && ( isMoneyRequestReport ( ancestorReport ) || isInvoiceReport ( ancestorReport ) ) ) {
@@ -5509,7 +5510,7 @@ function resolveActionableMentionWhisper(
55095510 }
55105511 let parentReportIDForUpdate : string | undefined ;
55115512 if ( parentInviteData ) {
5512- parentReportIDForUpdate = parentReport ?. reportID && parentReport . reportID !== reportID ? parentReport . reportID : report ?. parentReportID ;
5513+ parentReportIDForUpdate = isParentReportDifferent ? parentReport . reportID : report ?. parentReportID ;
55135514 }
55145515 const parentParticipantsOptimisticData = parentInviteData ?. optimistic ;
55155516 const parentParticipantsFailureData = parentInviteData ?. failure ;
You can’t perform that action at this time.
0 commit comments