Skip to content

Commit

Permalink
Merge pull request #29551 from Expensify/youssef_hide_split_bill_appr…
Browse files Browse the repository at this point in the history
…over

Only show Split Bill option in the user's own workspace chat
  • Loading branch information
youssef-lr authored Oct 16, 2023
2 parents ae36e7b + a16d2f2 commit 2133e39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3435,8 +3435,12 @@ function getMoneyRequestOptions(report, reportParticipants) {
// User created policy rooms and default rooms like #admins or #announce will always have the Split Bill option
// unless there are no participants at all (e.g. #admins room for a policy with only 1 admin)
// DM chats will have the Split Bill option only when there are at least 3 people in the chat.
// There is no Split Bill option for Workspace chats, IOU or Expense reports which are threads
if ((isChatRoom(report) && participants.length > 0) || (hasMultipleParticipants && !isPolicyExpenseChat(report) && !isMoneyRequestReport(report)) || isControlPolicyExpenseChat(report)) {
// There is no Split Bill option for IOU or Expense reports which are threads
if (
(isChatRoom(report) && participants.length > 0) ||
(hasMultipleParticipants && !isPolicyExpenseChat(report) && !isMoneyRequestReport(report)) ||
(isControlPolicyExpenseChat(report) && report.isOwnPolicyExpenseChat)
) {
return [CONST.IOU.MONEY_REQUEST_TYPE.SPLIT];
}

Expand Down

0 comments on commit 2133e39

Please sign in to comment.