From f90ffdaff25ad55701d70c89dbcecbed66d4c16d Mon Sep 17 00:00:00 2001 From: spiral Date: Sun, 5 Jun 2022 14:15:26 -0400 Subject: [PATCH] fix(dashboard): use display name for member/group embeds --- PluralKit.API/Controllers/v2/GroupControllerV2.cs | 2 +- PluralKit.API/Controllers/v2/MemberControllerV2.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.API/Controllers/v2/GroupControllerV2.cs b/PluralKit.API/Controllers/v2/GroupControllerV2.cs index 495f4407..25c88127 100644 --- a/PluralKit.API/Controllers/v2/GroupControllerV2.cs +++ b/PluralKit.API/Controllers/v2/GroupControllerV2.cs @@ -105,7 +105,7 @@ public class GroupControllerV2: PKControllerBase throw Errors.GroupNotFound; var system = await _repo.GetSystem(group.System); - var name = group.NameFor(LookupContext.ByNonOwner); + var name = group.DisplayName ?? group.Name; if (system.Name != null) name += $" ({system.Name})"; diff --git a/PluralKit.API/Controllers/v2/MemberControllerV2.cs b/PluralKit.API/Controllers/v2/MemberControllerV2.cs index b4ad7fb9..6a517727 100644 --- a/PluralKit.API/Controllers/v2/MemberControllerV2.cs +++ b/PluralKit.API/Controllers/v2/MemberControllerV2.cs @@ -87,7 +87,7 @@ public class MemberControllerV2: PKControllerBase throw Errors.MemberNotFound; var system = await _repo.GetSystem(member.System); - var name = member.NameFor(LookupContext.ByNonOwner); + var name = member.DisplayName ?? member.Name; if (system.Name != null) name += $" ({system.Name})";