From 58d4d6a426f32c7b1a20dad4f827be6f4163efbb Mon Sep 17 00:00:00 2001 From: Fedi Rajhi Date: Thu, 16 Feb 2023 21:01:49 +0100 Subject: [PATCH] [Fix] Exclude policy rooms from getChatByParticipants results --- src/libs/ReportUtils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 0a4fdcdebf87..7c3f21a0ee87 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1386,7 +1386,9 @@ function getChatByParticipants(newParticipantList) { if (!report || !report.participants) { return false; } - return _.isEqual(newParticipantList, report.participants.sort()); + + // Only return the room if it has all the participants and is not a policy room + return !isUserCreatedPolicyRoom(report) && _.isEqual(newParticipantList, report.participants.sort()); }); }