Skip to content

Commit e9f9cd5

Browse files
authored
Merge pull request #42624 from nkdengineer/fix/42415
2 parents 71f5f21 + 474d71f commit e9f9cd5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/libs/ReportUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5546,7 +5546,7 @@ function getMoneyRequestOptions(report: OnyxEntry<Report>, policy: OnyxEntry<Pol
55465546
// DM chats will have the Split Expense option.
55475547
// Your own workspace chats will have the split expense option.
55485548
if (
5549-
(isChatRoom(report) && otherParticipants.length > 0) ||
5549+
(isChatRoom(report) && !isAnnounceRoom(report) && otherParticipants.length > 0) ||
55505550
(isDM(report) && otherParticipants.length > 0) ||
55515551
(isGroupChat(report) && otherParticipants.length > 0) ||
55525552
(isPolicyExpenseChat(report) && report?.isOwnPolicyExpenseChat)

tests/unit/ReportUtilsTest.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,8 @@ describe('ReportUtils', () => {
464464
});
465465

466466
describe('return only iou split option if', () => {
467-
it('it is a chat room with more than one participant', () => {
468-
const onlyHaveSplitOption = [
469-
CONST.REPORT.CHAT_TYPE.POLICY_ADMINS,
470-
CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE,
471-
CONST.REPORT.CHAT_TYPE.DOMAIN_ALL,
472-
CONST.REPORT.CHAT_TYPE.POLICY_ROOM,
473-
].every((chatType) => {
467+
it('it is a chat room with more than one participant that is not an announce room', () => {
468+
const onlyHaveSplitOption = [CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, CONST.REPORT.CHAT_TYPE.DOMAIN_ALL, CONST.REPORT.CHAT_TYPE.POLICY_ROOM].every((chatType) => {
474469
const report = {
475470
...LHNTestUtils.getFakeReport(),
476471
chatType,

0 commit comments

Comments
 (0)