diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2024-03-05 11:19:52 +0100 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2024-03-05 11:19:52 +0100 |
commit | f41b6e5ec431c88bc1d94e4832d8ba49ddc42004 (patch) | |
tree | 503be94f5036f7cc221846c1eabf7c5edd107f1a /LibMatrix/EventIdResponse.cs | |
parent | Unknown changes (diff) | |
download | LibMatrix-f41b6e5ec431c88bc1d94e4832d8ba49ddc42004.tar.xz |
HomeserverEmulator work
Diffstat (limited to '')
-rw-r--r-- | LibMatrix/EventIdResponse.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/LibMatrix/EventIdResponse.cs b/LibMatrix/EventIdResponse.cs index 6a04229..c2ad273 100644 --- a/LibMatrix/EventIdResponse.cs +++ b/LibMatrix/EventIdResponse.cs @@ -2,7 +2,9 @@ using System.Text.Json.Serialization; namespace LibMatrix; -public class EventIdResponse { +public class EventIdResponse(string eventId) { + public EventIdResponse(StateEventResponse stateEventResponse) : this(stateEventResponse.EventId ?? throw new NullReferenceException("State event ID is null!")) { } + [JsonPropertyName("event_id")] - public required string EventId { get; set; } + public string EventId { get; set; } = eventId; } \ No newline at end of file |