1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Add a const for system users which should never display a profile

This commit is contained in:
Dean Herbert 2022-03-28 22:20:56 +09:00
parent 8c5594b3ea
commit a0692ce477

View File

@ -15,6 +15,11 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonObject(MemberSerialization.OptIn)]
public class APIUser : IEquatable<APIUser>, IUser
{
/// <summary>
/// A user ID which can be used to represent any system user which is not attached to a user profile.
/// </summary>
public const int SYSTEM_USER_ID = 0;
[JsonProperty(@"id")]
public int Id { get; set; } = 1;
@ -238,7 +243,7 @@ namespace osu.Game.Online.API.Requests.Responses
/// </summary>
public static readonly APIUser SYSTEM_USER = new APIUser
{
Id = 0,
Id = SYSTEM_USER_ID,
Username = "system",
Colour = @"9c0101",
};