Skip to content

Commit

Permalink
Merge pull request #37030 from esh-g/share-code-DM
Browse files Browse the repository at this point in the history
Prevent threads from being counted as DMs
  • Loading branch information
madmax330 authored Mar 12, 2024
2 parents 8461d2b + 6712b45 commit da76977
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ function isChatThread(report: OnyxEntry<Report>): boolean {
}

function isDM(report: OnyxEntry<Report>): boolean {
return isChatReport(report) && !getChatType(report);
return isChatReport(report) && !getChatType(report) && !isThread(report);
}

function isSelfDM(report: OnyxEntry<Report>): boolean {
Expand Down Expand Up @@ -1243,7 +1243,6 @@ function isMoneyRequestReport(reportOrID: OnyxEntry<Report> | EmptyObject | stri
function isOneOnOneChat(report: OnyxEntry<Report>): boolean {
const participantAccountIDs = report?.participantAccountIDs ?? [];
return (
!isThread(report) &&
!isChatRoom(report) &&
!isExpenseRequest(report) &&
!isMoneyRequestReport(report) &&
Expand Down

0 comments on commit da76977

Please sign in to comment.