mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 20:25:40 +00:00
57 lines
1.9 KiB
C#
57 lines
1.9 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
using System.Text.Json.Nodes;
|
|
using System.Text.Json.Serialization;
|
|
using Spacebar.Models.Generic;
|
|
|
|
namespace Spacebar.Models.Generic;
|
|
|
|
public class Presence {
|
|
[JsonPropertyName("user")]
|
|
public required PartialUser User { get; set; }
|
|
|
|
[JsonPropertyName("guild_id"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? GuildId { get; set; }
|
|
|
|
[JsonPropertyName("status")]
|
|
public string Status { get; set; } = "unknown";
|
|
|
|
// TODO
|
|
[JsonPropertyName("activities")]
|
|
public List<JsonObject> Activities { get; set; }
|
|
|
|
// TODO
|
|
[JsonPropertyName("hidden_activities")]
|
|
public List<JsonObject> HiddenActivities { get; set; }
|
|
|
|
[JsonPropertyName("client_status")]
|
|
public ClientStatuses ClientStatus { get; set; }
|
|
|
|
[JsonPropertyName("has_played_game")]
|
|
public bool? HasPlayedGame { get; set; }
|
|
|
|
// Unsure if this is used outside of op14
|
|
[JsonPropertyName("game")]
|
|
public JsonObject? Game { get; set; }
|
|
|
|
// Unsure if used outside of op14
|
|
[JsonPropertyName("processed_at_timestamp")]
|
|
public ulong? ProcessedAtTimestamp { get; set; }
|
|
|
|
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
|
public class ClientStatuses {
|
|
[JsonPropertyName("desktop"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? Desktop { get; set; }
|
|
|
|
[JsonPropertyName("mobile"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? Mobile { get; set; }
|
|
|
|
[JsonPropertyName("web"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? Web { get; set; }
|
|
|
|
[JsonPropertyName("embedded"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? Embedded { get; set; }
|
|
|
|
[JsonPropertyName("vr"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? Vr { get; set; }
|
|
}
|
|
} |