Skip to content

Commit dac21dc

Browse files
committed
update pinned logic
1 parent 6ed04b9 commit dac21dc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/libs/ReportUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7880,6 +7880,10 @@ function buildOptimisticAnnounceChat(policyID: string, accountIDs: number[]): Op
78807880
};
78817881
}
78827882

7883+
function shouldPinAdminRoomByDefault() {
7884+
return !isExpensifyTeam(currentUserEmail);
7885+
}
7886+
78837887
function buildOptimisticWorkspaceChats(policyID: string, policyName: string, expenseReportId?: string): OptimisticWorkspaceChats {
78847888
const pendingChatMembers = getPendingChatMembers(currentUserAccountID ? [currentUserAccountID] : [], [], CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD);
78857889
const adminsChatData = {
@@ -7890,7 +7894,7 @@ function buildOptimisticWorkspaceChats(policyID: string, policyName: string, exp
78907894
policyID,
78917895
ownerAccountID: CONST.POLICY.OWNER_ACCOUNT_ID_FAKE,
78927896
oldPolicyName: policyName,
7893-
isPinned: true,
7897+
isPinned: shouldPinAdminRoomByDefault(),
78947898
}),
78957899
};
78967900
const adminsChatReportID = adminsChatData.reportID;

0 commit comments

Comments
 (0)