[backend/api] Include AvatarAlt and BannerAlt in UserResponse

This commit is contained in:
pancakes 2024-12-18 19:13:38 +10:00 committed by Laura Hausmann
parent a5fedc930c
commit 4d39f657b0
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 5 additions and 1 deletions

View file

@ -28,7 +28,9 @@ public class UserRenderer(IOptions<Config.InstanceSection> config, DatabaseConte
Host = user.Host,
DisplayName = user.DisplayName,
AvatarUrl = user.GetAvatarUrl(config.Value),
AvatarAlt = user.Avatar?.Comment,
BannerUrl = user.GetBannerUrl(config.Value),
BannerAlt = user.Banner?.Comment,
InstanceName = instanceName,
InstanceIconUrl = instanceIcon,
Emojis = emoji,

View file

@ -11,7 +11,9 @@ public class UserResponse : IIdentifiable
public required string? Host { get; set; }
public required string? DisplayName { get; set; }
public required string? AvatarUrl { get; set; }
public string? AvatarAlt { get; set; }
public required string? BannerUrl { get; set; }
public string? BannerAlt { get; set; }
public required string? InstanceName { get; set; }
public required string? InstanceIconUrl { get; set; }