diff --git a/android/app/build.gradle b/android/app/build.gradle
index e97b3e074aa3..323f9011a0bb 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
- versionCode 1001033003
- versionName "1.3.30-3"
+ versionCode 1001033004
+ versionName "1.3.30-4"
}
splits {
diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist
index 08c5ff053515..2e21547e0153 100644
--- a/ios/NewExpensify/Info.plist
+++ b/ios/NewExpensify/Info.plist
@@ -32,7 +32,7 @@
CFBundleVersion
- 1.3.30.3
+ 1.3.30.4
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist
index 55ea77223917..f0c72b026d1c 100644
--- a/ios/NewExpensifyTests/Info.plist
+++ b/ios/NewExpensifyTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 1.3.30.3
+ 1.3.30.4
diff --git a/package-lock.json b/package-lock.json
index cfd597689e2a..445f8dfd3065 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "new.expensify",
- "version": "1.3.30-3",
+ "version": "1.3.30-4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "new.expensify",
- "version": "1.3.30-3",
+ "version": "1.3.30-4",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index aba4b2525250..e42e7d95ce15 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
- "version": "1.3.30-3",
+ "version": "1.3.30-4",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js
index 6f317cc08d29..63093869b590 100644
--- a/src/libs/ReportUtils.js
+++ b/src/libs/ReportUtils.js
@@ -1970,6 +1970,28 @@ function getChatByParticipants(newParticipantList) {
});
}
+/**
+ * Attempts to find a report in onyx with the provided email list of participants. Does not include threads
+ * This is temporary function while migrating from PersonalDetails to PersonalDetailsList
+ *
+ * @deprecated - use getChatByParticipants()
+ *
+ * @param {Array} participantsLoginList
+ * @returns {Array|undefined}
+ */
+function getChatByParticipantsByLoginList(participantsLoginList) {
+ participantsLoginList.sort();
+ return _.find(allReports, (report) => {
+ // If the report has been deleted, or there are no participants (like an empty #admins room) then skip it
+ if (!report || !report.participants || isThread(report)) {
+ return false;
+ }
+
+ // Only return the room if it has all the participants and is not a policy room
+ return !isUserCreatedPolicyRoom(report) && _.isEqual(participantsLoginList, _.sortBy(report.participants));
+ });
+}
+
/**
* Attempts to find a report in onyx with the provided list of participants in given policy
* @param {Array} newParticipantList
@@ -2295,6 +2317,7 @@ export {
buildOptimisticTaskCommentReportAction,
shouldReportBeInOptionList,
getChatByParticipants,
+ getChatByParticipantsByLoginList,
getChatByParticipantsAndPolicy,
getAllPolicyReports,
getIOUReportActionMessage,
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js
index 4cf90dbcb1ab..3e541b1dd854 100644
--- a/src/libs/actions/Report.js
+++ b/src/libs/actions/Report.js
@@ -25,6 +25,7 @@ import * as UserUtils from '../UserUtils';
import * as Welcome from './Welcome';
import * as PersonalDetailsUtils from '../PersonalDetailsUtils';
import SidebarUtils from '../SidebarUtils';
+import * as OptionsListUtils from '../OptionsListUtils';
let currentUserEmail;
let currentUserAccountID;
@@ -479,10 +480,11 @@ function openReport(reportID, participantLoginList = [], newReportObject = {}, p
* @param {Array} userLogins list of user logins to start a chat report with.
*/
function navigateToAndOpenReport(userLogins) {
- const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins(userLogins);
let newChat = {};
- const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
+ const formattedUserLogins = _.map(userLogins, (login) => OptionsListUtils.addSMSDomainIfPhoneNumber(login).toLowerCase());
+ const chat = ReportUtils.getChatByParticipantsByLoginList(formattedUserLogins);
if (!chat) {
+ const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins(userLogins);
newChat = ReportUtils.buildOptimisticChatReport(participantAccountIDs);
}
const reportID = chat ? chat.reportID : newChat.reportID;