Skip to content

Commit

Permalink
Disallow leaving policy expense chats
Browse files Browse the repository at this point in the history
  • Loading branch information
Beamanator committed Aug 30, 2023
1 parent 01d0d3b commit dbdbf0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3093,6 +3093,7 @@ function getMoneyRequestOptions(report, reportParticipants, betas) {
* `public_announce` - Only non-policy members can leave (it's auto-shared with policy members)
* `policy_admins` - Nobody can leave (it's auto-shared with all policy admins)
* `policy_announce` - Nobody can leave (it's auto-shared with all policy members)
* `policyExpenseChat` - Nobody can leave (it's auto-shared with all policy members)
* `policy` - Anyone can leave (though only policy members can join)
* `domain` - Nobody can leave (it's auto-shared with domain members)
* `dm` - Nobody can leave (it's auto-shared with users)
Expand All @@ -3109,6 +3110,7 @@ function canLeaveRoom(report, isPolicyMember) {
if (
report.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ADMINS ||
report.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE ||
report.chatType === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT ||
report.chatType === CONST.REPORT.CHAT_TYPE.DOMAIN_ALL ||
_.isEmpty(report.chatType)
) {
Expand Down

0 comments on commit dbdbf0e

Please sign in to comment.