HomeserverEmulator work
3 files changed, 30 insertions, 2 deletions
diff --git a/LibMatrix/Responses/CreateRoomRequest.cs b/LibMatrix/Responses/CreateRoomRequest.cs
index d78f574..ee4317e 100644
--- a/LibMatrix/Responses/CreateRoomRequest.cs
+++ b/LibMatrix/Responses/CreateRoomRequest.cs
@@ -12,7 +12,9 @@ namespace LibMatrix.Responses;
public class CreateRoomRequest {
[JsonIgnore] public CreationContentBaseType CreationContentBaseType;
- public CreateRoomRequest() => CreationContentBaseType = new CreationContentBaseType(this);
+ public CreateRoomRequest() {
+ CreationContentBaseType = new CreationContentBaseType(this);
+ }
[JsonPropertyName("name")]
public string? Name { get; set; }
@@ -37,7 +39,7 @@ public class CreateRoomRequest {
public string? Visibility { get; set; }
[JsonPropertyName("power_level_content_override")]
- public RoomPowerLevelEventContent PowerLevelContentOverride { get; set; } = null!;
+ public RoomPowerLevelEventContent? PowerLevelContentOverride { get; set; } = null!;
[JsonPropertyName("creation_content")]
public JsonObject CreationContent { get; set; } = new();
diff --git a/LibMatrix/Responses/RoomKeysResponse.cs b/LibMatrix/Responses/RoomKeysResponse.cs
new file mode 100644
index 0000000..8dc305a
--- /dev/null
+++ b/LibMatrix/Responses/RoomKeysResponse.cs
@@ -0,0 +1,19 @@
+using System.Text.Json.Nodes;
+using System.Text.Json.Serialization;
+
+namespace LibMatrix.Responses;
+
+public class RoomKeysRequest {
+ [JsonPropertyName("algorithm")]
+ public string Algorithm { get; set; }
+
+ [JsonPropertyName("auth_data")]
+ public JsonObject AuthData { get; set; }
+}
+public class RoomKeysResponse : RoomKeysRequest {
+ [JsonPropertyName("version")]
+ public string Version { get; set; }
+
+ [JsonPropertyName("etag")]
+ public string Etag { get; set; }
+}
\ No newline at end of file
diff --git a/LibMatrix/Responses/SyncResponse.cs b/LibMatrix/Responses/SyncResponse.cs
index 49259d0..e4addb6 100644
--- a/LibMatrix/Responses/SyncResponse.cs
+++ b/LibMatrix/Responses/SyncResponse.cs
@@ -83,6 +83,13 @@ public class SyncResponse {
public SummaryDataStructure? Summary { get; set; }
public class TimelineDataStructure {
+ public TimelineDataStructure() { }
+
+ public TimelineDataStructure(List<StateEventResponse>? events, bool? limited) {
+ Events = events;
+ Limited = limited;
+ }
+
[JsonPropertyName("events")]
public List<StateEventResponse>? Events { get; set; }
|