Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add actor display name in lhn #34212

Merged
merged 1 commit into from
Jan 30, 2024
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}`;
Copy link
Contributor

@koko57 koko57 Jan 31, 2024

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
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
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
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
Loading