From 30a0868789466012bab869af4300aef5a9cac108 Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 30 May 2024 09:46:43 +0000 Subject: Rename legacy event types --- .../Spec/Ephemeral/PresenceLegacyEventContent.cs | 30 ++++++++++++++++++++++ .../Spec/Ephemeral/PresenceStateEventContent.cs | 30 ---------------------- .../Spec/Ephemeral/RoomTypingEventContent.cs | 11 -------- .../Spec/Ephemeral/RoomTypingLegacyEventContent.cs | 11 ++++++++ 4 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceLegacyEventContent.cs delete mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs delete mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs create mode 100644 LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingLegacyEventContent.cs (limited to 'LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral') diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceLegacyEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceLegacyEventContent.cs new file mode 100644 index 0000000..136b69a --- /dev/null +++ b/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceLegacyEventContent.cs @@ -0,0 +1,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; } +} \ No newline at end of file diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs deleted file mode 100644 index 676f36d..0000000 --- a/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Text.Json.Serialization; - -namespace LibMatrix.LegacyEvents.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; } -} \ No newline at end of file diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs deleted file mode 100644 index 97b86fc..0000000 --- a/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.Json.Serialization; - -namespace LibMatrix.LegacyEvents.EventTypes.Spec.State; - -[MatrixEvent(EventName = EventId)] -public class RoomTypingEventContent : EventContent { - public const string EventId = "m.typing"; - - [JsonPropertyName("user_ids")] - public string[]? UserIds { get; set; } -} \ No newline at end of file diff --git a/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingLegacyEventContent.cs b/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingLegacyEventContent.cs new file mode 100644 index 0000000..a44b6a5 --- /dev/null +++ b/LibMatrix.LegacyEvents.EventTypes/Spec/Ephemeral/RoomTypingLegacyEventContent.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.LegacyEvents.EventTypes.Spec.State; + +[LegacyMatrixEvent(EventName = EventId)] +public class RoomTypingLegacyEventContent : LegacyEventContent { + public const string EventId = "m.typing"; + + [JsonPropertyName("user_ids")] + public string[]? UserIds { get; set; } +} \ No newline at end of file -- cgit 1.4.1