Skip to content

Commit

Permalink
Fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetlath committed Jun 29, 2023
1 parent dc1e5b0 commit 60dbc9c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,7 @@ function canLeaveRoom(report, isPolicyMember) {
}

/**
* @param {number[]} participantAccountIDs
* @param {Number[]} participantAccountIDs
* @returns {Boolean}
*/
function isCurrentUserTheOnlyParticipant(participantAccountIDs) {
Expand All @@ -2260,18 +2260,18 @@ function isCurrentUserTheOnlyParticipant(participantAccountIDs) {
* 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.
*
* @param {number[]} participantAccountIDs
* @param {Number[]} participantAccountIDs
* @returns {string}
*/
function getWhisperDisplayNames(participantAccountIDs) {
const isWhisperOnlyVisibleToCurrentUSer = isCurrentUserTheOnlyParticipant(participantAccountIDs);
const isWhisperOnlyVisibleToCurrentUser = isCurrentUserTheOnlyParticipant(participantAccountIDs);

// 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) {
if (isWhisperOnlyVisibleToCurrentUser) {
return Localize.translateLocal('common.youAfterPreposition');
}

return _.map(participantAccountIDs, (accountID) => getDisplayNameForParticipant(accountID, !isWhisperOnlyVisibleToCurrentUSer)).join(', ');
return _.map(participantAccountIDs, (accountID) => getDisplayNameForParticipant(accountID, !isWhisperOnlyVisibleToCurrentUser)).join(', ');
}

/**
Expand Down

0 comments on commit 60dbc9c

Please sign in to comment.