Skip to content

Commit

Permalink
Add notification preference to simplified report object
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenmemon committed Jun 24, 2021
1 parent 8f8d835 commit af1e5ff
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 af1e5ff

Please sign in to comment.