refactor: make Member.display_name non-nullable and fall back to Member.name

This commit is contained in:
sam 2024-11-23 20:41:11 +01:00
parent d0bf638a21
commit 6abf505c40
Signed by: sam
GPG key ID: B4EF20DDE721CAA1

View file

@ -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<FieldEntry> 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,