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

Fix new IOU and Split Bill chats not being unread #15052

Merged
merged 8 commits into from
Mar 19, 2023
7 changes: 4 additions & 3 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ function reconnect(reportID) {
value: {
isLoadingReportActions: true,
isLoadingMoreReportActions: false,
reportName: lodashGet(allReports, [reportID, 'reportName'], CONST.REPORT.DEFAULT_REPORT_NAME),
puneetlath marked this conversation as resolved.
Show resolved Hide resolved
},
}],
successData: [{
Expand Down Expand Up @@ -657,10 +658,10 @@ function handleReportChanged(report) {
}
}

// A report can be missing a name if a comment is received via pusher event
// and the report does not yet exist in Onyx (eg. a new DM created with the logged in person)
// A report can be missing a name if a comment is received via pusher event and the report does not yet exist in Onyx (eg. a new DM created with the logged in person)
// In this case, we call reconnect so that we can fetch the report data without marking it as read
if (report.reportID && report.reportName === undefined) {
openReport(report.reportID);
reconnect(report.reportID);
puneetlath marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down