diff options
Diffstat (limited to 'LibMatrix/EventTypes/Spec/Ephemeral')
-rw-r--r-- | LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs | 21 | ||||
-rw-r--r-- | LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs | 11 |
2 files changed, 32 insertions, 0 deletions
diff --git a/LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs b/LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs new file mode 100644 index 0000000..b12da5b --- /dev/null +++ b/LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; +using LibMatrix.Helpers; +using LibMatrix.Interfaces; + +namespace LibMatrix.EventTypes.Spec.State; + +[MatrixEvent(EventName = "m.presence")] +public class PresenceEventContent : EventContent { + [JsonPropertyName("presence")] + 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")] + public string StatusMessage { get; set; } + [JsonPropertyName("avatar_url")] + public string AvatarUrl { get; set; } + [JsonPropertyName("displayname")] + public string DisplayName { get; set; } +} diff --git a/LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs b/LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs new file mode 100644 index 0000000..01cfacf --- /dev/null +++ b/LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using LibMatrix.Helpers; +using LibMatrix.Interfaces; + +namespace LibMatrix.EventTypes.Spec.State; + +[MatrixEvent(EventName = "m.typing")] +public class RoomTypingEventContent : EventContent { + [JsonPropertyName("user_ids")] + public string[]? UserIds { get; set; } +} |