Skip to content

Commit

Permalink
Merge pull request #3095 from Expensify/amal-chattype-info
Browse files Browse the repository at this point in the history
See extra fields per chat
  • Loading branch information
stitesExpensify authored Jun 8, 2021
2 parents 350991b + 7f9ee72 commit ccdeef7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,17 @@ function getSimplifiedReportObject(report) {
const lastMessageText = lodashGet(lastReportAction, ['message', 'html'], '')
.replace(/((<br[^>]*>)+)/gi, ' ')
.replace(/(<([^>]+)>)/gi, '');
const reportName = lodashGet(report, 'reportNameValuePairs.type') === 'chat'
const reportName = lodashGet(report, ['reportNameValuePairs', 'type']) === 'chat'
? getChatReportName(report.sharedReportList)
: report.reportName;
const lastActorEmail = lodashGet(lastReportAction, 'accountEmail', '');

return {
reportID: report.reportID,
reportName,
chatType: lodashGet(report, ['reportNameValuePairs', 'chatType'], ''),
ownerEmail: lodashGet(report, ['ownerEmail'], ''),
policyID: lodashGet(report, ['reportNameValuePairs', 'expensify_policyID'], ''),
unreadActionCount: getUnreadActionCount(report),
maxSequenceNumber: report.reportActionList.length,
participants: getParticipantEmailsFromReport(report),
Expand Down

0 comments on commit ccdeef7

Please sign in to comment.