[backend] Add bot and cat fields to users

This commit is contained in:
pancakes 2024-11-16 19:37:51 +10:00 committed by Laura Hausmann
parent a79d012fcb
commit 68684dbfcb
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 5 additions and 1 deletions

View file

@ -31,7 +31,9 @@ public class UserRenderer(IOptions<Config.InstanceSection> config, DatabaseConte
InstanceName = instanceName,
InstanceIconUrl = instanceIcon,
Emojis = emoji,
MovedTo = user.MovedToUri
MovedTo = user.MovedToUri,
IsBot = user.IsBot,
IsCat = user.IsCat
};
}

View file

@ -14,6 +14,8 @@ public class UserResponse
public required string? InstanceName { get; set; }
public required string? InstanceIconUrl { get; set; }
public bool IsBot { get; set; } = false;
public bool IsCat { get; set; } = false;
public List<EmojiResponse> Emojis { get; set; } = [];
[JI(Condition = WhenWritingNull)] public string? MovedTo { get; set; }