From bb73884c2f47cdbc9dda199ee03193c85877e218 Mon Sep 17 00:00:00 2001 From: Rocio Perez-Cano Date: Fri, 21 Apr 2023 11:47:34 -0400 Subject: [PATCH 1/2] Remove this so it doesn't break after building it --- src/libs/ReportUtils.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 0c70edfe8f9a..477738d06c4d 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1703,6 +1703,15 @@ function canLeaveRoom(report, isPolicyMember) { return true; } + +/** + * @param {string[]} participants + * @returns {Boolean} + */ +function isCurrentUserTheOnlyParticipant(participants) { + return participants && participants.length === 1 && participants[0] === sessionEmail; +} + /** * Returns display names for those that can see the whisper. * However, it returns "you" if the current user is the only one who can see it besides the person that sent it. @@ -1711,7 +1720,7 @@ function canLeaveRoom(report, isPolicyMember) { * @returns {string} */ function getWhisperDisplayNames(participants) { - const isWhisperOnlyVisibleToCurrentUSer = this.isCurrentUserTheOnlyParticipant(participants); + const isWhisperOnlyVisibleToCurrentUSer = isCurrentUserTheOnlyParticipant(participants); // When the current user is the only participant, the display name needs to be "you" because that's the only person reading it if (isWhisperOnlyVisibleToCurrentUSer) { @@ -1721,14 +1730,6 @@ function getWhisperDisplayNames(participants) { return _.map(participants, login => getDisplayNameForParticipant(login, !isWhisperOnlyVisibleToCurrentUSer)).join(', '); } -/** - * @param {string[]} participants - * @returns {Boolean} - */ -function isCurrentUserTheOnlyParticipant(participants) { - return participants && participants.length === 1 && participants[0] === sessionEmail; -} - export { getReportParticipantsTitle, isReportMessageAttachment, From a7fad78753982362cc35a3ae4b6da4e47c8cf3cc Mon Sep 17 00:00:00 2001 From: Rocio Perez-Cano Date: Fri, 21 Apr 2023 11:57:25 -0400 Subject: [PATCH 2/2] Extra blank line --- src/libs/ReportUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 477738d06c4d..41ab03b816a4 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1703,7 +1703,6 @@ function canLeaveRoom(report, isPolicyMember) { return true; } - /** * @param {string[]} participants * @returns {Boolean}