Skip to content

Commit

Permalink
Fix logic to check if a report is concierge chat
Browse files Browse the repository at this point in the history
  • Loading branch information
ShridharGoel authored Jul 9, 2024
1 parent 9c32293 commit e9223cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,9 @@ function isSystemChat(report: OnyxEntry<Report>): boolean {
* Only returns true if this is our main 1:1 DM report with Concierge.
*/
function isConciergeChatReport(report: OnyxInputOrEntry<Report>): boolean {
const participantAccountIDs = Object.keys(report?.participants ?? {});
const participantAccountIDs = Object.keys(report?.participants ?? {})
.map(Number)
.filter((accountID) => accountID !== currentUserAccountID);
return participantAccountIDs.length === 1 && Number(participantAccountIDs[0]) === CONST.ACCOUNT_ID.CONCIERGE && !isChatThread(report);
}

Expand Down

0 comments on commit e9223cf

Please sign in to comment.