From af1e5fff40b8099e6c20fc729afa175a3e41e5aa Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Thu, 24 Jun 2021 15:18:54 -0700 Subject: [PATCH] Add notification preference to simplified report object --- src/libs/actions/Report.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 6cf3650e433a..8b9d13261219 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -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, @@ -191,6 +194,7 @@ function getSimplifiedReportObject(report) { lastMessageText: isLastMessageAttachment ? '[Attachment]' : lastMessageText, lastActorEmail, hasOutstandingIOU: false, + notificationPreference, }; }