Skip to content

Commit ec93d81

Browse files
authored
Merge pull request Expensify#87287 from Expensify/rory/fix-onboarding-track-loop
Fix onboarding loop for Track/Personal Spend path when Concierge report not in collection
2 parents c4c4beb + 57ff0e4 commit ec93d81

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/libs/ReportUtils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11728,9 +11728,12 @@ function prepareOnboardingOnyxData({
1172811728
// When posting to admins room and the user is in the suggestedFollowups beta, we skip tasks in favor of backend-generated followups.
1172911729
const shouldUseFollowupsInsteadOfTasks = shouldPostTasksInAdminsRoom && Permissions.isBetaEnabled(CONST.BETAS.SUGGESTED_FOLLOWUPS, betas, betaConfiguration);
1173011730
const adminsChatReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${adminsChatReportID}`];
11731+
const conciergeChat =
11732+
getChatByParticipants([CONST.ACCOUNT_ID.CONCIERGE, deprecatedCurrentUserAccountID ?? CONST.DEFAULT_NUMBER_ID], deprecatedAllReports, false) ??
11733+
(conciergeReportIDOnyxConnect ? {reportID: conciergeReportIDOnyxConnect} : undefined);
1173111734
const targetChatReport = shouldPostTasksInAdminsRoom
1173211735
? (adminsChatReport ?? {reportID: adminsChatReportID, policyID: onboardingPolicyID, chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS})
11733-
: getChatByParticipants([CONST.ACCOUNT_ID.CONCIERGE, deprecatedCurrentUserAccountID ?? CONST.DEFAULT_NUMBER_ID], deprecatedAllReports, false);
11736+
: conciergeChat;
1173411737
const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {};
1173511738
const targetChatType = targetChatReport?.chatType;
1173611739

0 commit comments

Comments
 (0)