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.Id,
member.Sid, member.Sid,
member.Name, member.Name,
member.DisplayName, member.DisplayName ?? member.Name,
member.Bio, member.Bio,
AvatarUrlFor(member), AvatarUrlFor(member),
member.Links, member.Links,
@ -60,7 +60,7 @@ public class MemberRendererService(DatabaseContext db, Config config)
member.Id, member.Id,
member.Sid, member.Sid,
member.Name, member.Name,
member.DisplayName, member.DisplayName ?? member.Name,
member.Bio, member.Bio,
AvatarUrlFor(member), AvatarUrlFor(member),
member.Names, member.Names,
@ -87,7 +87,7 @@ public class MemberRendererService(DatabaseContext db, Config config)
Snowflake Id, Snowflake Id,
string Sid, string Sid,
string Name, string Name,
string? DisplayName, string DisplayName,
string? Bio, string? Bio,
string? AvatarUrl, string? AvatarUrl,
IEnumerable<FieldEntry> Names, IEnumerable<FieldEntry> Names,
@ -99,7 +99,7 @@ public class MemberRendererService(DatabaseContext db, Config config)
Snowflake Id, Snowflake Id,
string Sid, string Sid,
string Name, string Name,
string? DisplayName, string DisplayName,
string? Bio, string? Bio,
string? AvatarUrl, string? AvatarUrl,
string[] Links, string[] Links,