Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra concierge CreateChatReport call #8340

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function fetchChatReportsByIDs(chatList, shouldRedirectIfInaccessible = false) {

// Fetch the personal details if there are any
PersonalDetails.getFromReportParticipants(_.values(simplifiedReports));
return fetchedReports;
return simplifiedReports;
})
.catch((err) => {
if (err.message !== CONST.REPORT.ERROR.INACCESSIBLE_REPORT) {
Expand Down Expand Up @@ -907,7 +907,8 @@ function fetchOrCreateChatReport(participants, shouldNavigate = true) {
}

// Merge report into Onyx
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${data.reportID}`, {reportID: data.reportID});
const simplifiedReportObject = getSimplifiedReportObject(data);
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${data.reportID}`, simplifiedReportObject);

if (shouldNavigate) {
// Redirect the logged in person to the new report
Expand All @@ -916,7 +917,7 @@ function fetchOrCreateChatReport(participants, shouldNavigate = true) {

// We are returning an array with a report object here since fetchAllReports calls this method or
// fetchChatReportsByIDs which returns an array of report objects.
return [data];
return [simplifiedReportObject];
});
}

Expand Down