From 98fc1eaca155a88ff86cba3cd8daedcd8eacf84c Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 1 Dec 2023 13:28:18 +0700 Subject: [PATCH] Fix new user does not appear in start chat after request IOU --- src/libs/OptionsListUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index c616587c3983..d12f2438626e 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -1208,7 +1208,7 @@ function getOptions( // This is a temporary fix for all the logic that's been breaking because of the new privacy changes // See https://github.com/Expensify/Expensify/issues/293465 for more context // Moreover, we should not override the personalDetails object, otherwise the createOption util won't work properly, it returns incorrect tooltipText - const havingLoginPersonalDetails = !includeP2P ? {} : _.pick(personalDetails, (detail) => Boolean(detail.login)); + const havingLoginPersonalDetails = !includeP2P ? {} : _.pick(personalDetails, (detail) => Boolean(detail.login) && !detail.isOptimisticPersonalDetail); let allPersonalDetailsOptions = _.map(havingLoginPersonalDetails, (personalDetail) => createOption([personalDetail.accountID], personalDetails, reportMapForAccountIDs[personalDetail.accountID], reportActions, { showChatPreviewLine, @@ -1381,7 +1381,7 @@ function getOptions( } return { - personalDetails: _.filter(personalDetailsOptions, (personalDetailsOption) => !personalDetailsOption.isOptimisticPersonalDetail), + personalDetails: personalDetailsOptions, recentReports: recentReportOptions, userToInvite: canInviteUser ? userToInvite : null, currentUserOption,