From f11fe491349854526f8d13e8b62458baeb3b23b6 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Fri, 9 Feb 2024 16:30:49 +0100 Subject: Consistently use EventId for event types --- .../Spec/Ephemeral/PresenceStateEventContent.cs | 19 ++++++++++++++----- .../Spec/Ephemeral/RoomTypingEventContent.cs | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'LibMatrix.EventTypes/Spec/Ephemeral') diff --git a/LibMatrix.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs b/LibMatrix.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs index 1e98e12..fc2c355 100644 --- a/LibMatrix.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs +++ b/LibMatrix.EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs @@ -6,16 +6,25 @@ namespace LibMatrix.EventTypes.Spec.Ephemeral; public class PresenceEventContent : EventContent { public const string EventId = "m.presence"; - [JsonPropertyName("presence"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [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)] + + [JsonPropertyName("status_msg")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? StatusMessage { get; set; } - [JsonPropertyName("avatar_url"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + + [JsonPropertyName("avatar_url")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? AvatarUrl { get; set; } - [JsonPropertyName("displayname"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + + [JsonPropertyName("displayname")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? DisplayName { get; set; } -} +} \ No newline at end of file diff --git a/LibMatrix.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs b/LibMatrix.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs index 48739f2..494936d 100644 --- a/LibMatrix.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs +++ b/LibMatrix.EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs @@ -8,4 +8,4 @@ public class RoomTypingEventContent : EventContent { [JsonPropertyName("user_ids")] public string[]? UserIds { get; set; } -} +} \ No newline at end of file -- cgit 1.4.1