about summary refs log tree commit diff
path: root/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceLegacyEventContent.cs
blob: 136b69ad777a71e5f25ef006b403aaa175ae94ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Text.Json.Serialization;

namespace LibMatrix.LegacyEvents.EventTypes.Spec.Ephemeral;

[LegacyMatrixEvent(EventName = EventId)]
public class PresenceLegacyEventContent : LegacyEventContent {
    public const string EventId = "m.presence";

    [JsonPropertyName("presence")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public string? Presence { get; set; }

    [JsonPropertyName("last_active_ago")]
    public long LastActiveAgo { get; set; }

    [JsonPropertyName("currently_active")]
    public bool CurrentlyActive { get; set; }

    [JsonPropertyName("status_msg")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public string? StatusMessage { get; set; }

    [JsonPropertyName("avatar_url")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public string? AvatarUrl { get; set; }

    [JsonPropertyName("displayname")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public string? DisplayName { get; set; }
}