From 5e374b0e9e5f84143cadda47444e67c1dcc71973 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 9 Jan 2024 16:28:15 +0700 Subject: [PATCH] fix: add actor display name in lhn --- src/libs/SidebarUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index 6e46ec320066..ddeef6693bb9 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -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}`; const roomName = lastAction?.originalMessage?.roomName ?? ''; if (roomName) { const preposition =