about summary refs log tree commit diff
path: root/LibMatrix.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs
blob: fc2c35561a46e22bc1d208798a3f3e74da666b4d (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.EventTypes.Spec.Ephemeral;

[MatrixEvent(EventName = EventId)]
public class PresenceEventContent : EventContent {
    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; }
}