From 6abf505c40e3bb22cb08474a90581a98b19d8622 Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 23 Nov 2024 20:41:11 +0100 Subject: [PATCH] refactor: make Member.display_name non-nullable and fall back to Member.name --- Foxnouns.Backend/Services/MemberRendererService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Foxnouns.Backend/Services/MemberRendererService.cs b/Foxnouns.Backend/Services/MemberRendererService.cs index f8588c2..7d7cac0 100644 --- a/Foxnouns.Backend/Services/MemberRendererService.cs +++ b/Foxnouns.Backend/Services/MemberRendererService.cs @@ -32,7 +32,7 @@ public class MemberRendererService(DatabaseContext db, Config config) member.Id, member.Sid, member.Name, - member.DisplayName, + member.DisplayName ?? member.Name, member.Bio, AvatarUrlFor(member), member.Links, @@ -60,7 +60,7 @@ public class MemberRendererService(DatabaseContext db, Config config) member.Id, member.Sid, member.Name, - member.DisplayName, + member.DisplayName ?? member.Name, member.Bio, AvatarUrlFor(member), member.Names, @@ -87,7 +87,7 @@ public class MemberRendererService(DatabaseContext db, Config config) Snowflake Id, string Sid, string Name, - string? DisplayName, + string DisplayName, string? Bio, string? AvatarUrl, IEnumerable Names, @@ -99,7 +99,7 @@ public class MemberRendererService(DatabaseContext db, Config config) Snowflake Id, string Sid, string Name, - string? DisplayName, + string DisplayName, string? Bio, string? AvatarUrl, string[] Links,