Skip to content

Commit

Permalink
Merge pull request #3746 from Expensify/yuwen-notificationPreference
Browse files Browse the repository at this point in the history
Add notification preference to simplified report object
  • Loading branch information
yuwenmemon authored Jun 24, 2021
2 parents 12e9392 + af1e5ff commit a029762
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ function getSimplifiedReportObject(report) {
? getChatReportName(report, chatType)
: report.reportName;
const lastActorEmail = lodashGet(lastReportAction, 'accountEmail', '');
const notificationPreference = isDefaultRoom({chatType})
? lodashGet(report, ['reportNameValuePairs', 'notificationPreferences', currentUserAccountID], 'daily')
: '';

return {
reportID: report.reportID,
Expand All @@ -191,6 +194,7 @@ function getSimplifiedReportObject(report) {
lastMessageText: isLastMessageAttachment ? '[Attachment]' : lastMessageText,
lastActorEmail,
hasOutstandingIOU: false,
notificationPreference,
};
}

Expand Down

0 comments on commit a029762

Please sign in to comment.