File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -5969,12 +5969,18 @@ function buildOptimisticIOUReportAction(params: BuildOptimisticIOUReportActionPa
5969
5969
// IOUs of type split only exist in group DMs and those don't have an iouReport so we need to delete the IOUReportID key
5970
5970
if ( type === CONST . IOU . REPORT_ACTION_TYPE . SPLIT ) {
5971
5971
delete originalMessage . IOUReportID ;
5972
+ }
5973
+
5974
+ if ( type !== CONST . IOU . REPORT_ACTION_TYPE . PAY ) {
5972
5975
// Split expense made from a policy expense chat only have the payee's accountID as the participant because the payer could be any policy admin
5973
- if ( isOwnPolicyExpenseChat ) {
5976
+ if ( isOwnPolicyExpenseChat && type === CONST . IOU . REPORT_ACTION_TYPE . SPLIT ) {
5974
5977
originalMessage . participantAccountIDs = currentUserAccountID ? [ currentUserAccountID ] : [ ] ;
5975
5978
} else {
5976
5979
originalMessage . participantAccountIDs = currentUserAccountID
5977
- ? [ currentUserAccountID , ...participants . map ( ( participant ) => participant . accountID ?? CONST . DEFAULT_NUMBER_ID ) ]
5980
+ ? [
5981
+ currentUserAccountID ,
5982
+ ...participants . filter ( ( participant ) => participant . accountID !== currentUserAccountID ) . map ( ( participant ) => participant . accountID ?? CONST . DEFAULT_NUMBER_ID ) ,
5983
+ ]
5978
5984
: participants . map ( ( participant ) => participant . accountID ?? CONST . DEFAULT_NUMBER_ID ) ;
5979
5985
}
5980
5986
}
You can’t perform that action at this time.
0 commit comments