Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,9 @@ function getOptionData(
? Localize.translate(preferredLocale, 'workspace.invite.invited')
: Localize.translate(preferredLocale, 'workspace.invite.removed');
const users = Localize.translate(preferredLocale, targetAccountIDs.length > 1 ? 'workspace.invite.users' : 'workspace.invite.user');
result.alternateText = `${verb} ${targetAccountIDs.length} ${users}`;

const actorDisplayName = ReportUtils.getDisplayNameForParticipant(lastAction.actorAccountID);
result.alternateText =
lastAction.actorAccountID === currentUserAccountID ? `${verb} ${targetAccountIDs.length} ${users}` : `${actorDisplayName} ${verb} ${targetAccountIDs.length} ${users}`;

@koko57 koko57 Jan 31, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove const actorDisplayName and replace currentUserAccountID with lastActorDisplayName

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to create a follow PR to refactor this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@francoisl wdyt?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gotchu, sent a PR here.

const roomName = lastAction?.originalMessage?.roomName ?? '';
if (roomName) {
const preposition =
Expand Down