diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2024-04-05 18:58:32 +0200 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2024-04-05 18:58:32 +0200 |
commit | 37b97d65c0a5262539a5de560e911048166b8bba (patch) | |
tree | f704a9c703b0ec47122a460576e151e0cb06fdc6 /LibMatrix/Responses | |
parent | Fix merge conficts between machines (diff) | |
download | LibMatrix-37b97d65c0a5262539a5de560e911048166b8bba.tar.xz |
Fix homeserver resolution, rewrite homeserver initialisation, HSE work
Diffstat (limited to 'LibMatrix/Responses')
-rw-r--r-- | LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs | 23 | ||||
-rw-r--r-- | LibMatrix/Responses/Admin/AdminRoomListingResult.cs | 64 | ||||
-rw-r--r-- | LibMatrix/Responses/LoginResponse.cs | 5 |
3 files changed, 3 insertions, 89 deletions
diff --git a/LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs b/LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs deleted file mode 100644 index ceb1b3f..0000000 --- a/LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Text.Json.Serialization; - -namespace LibMatrix.Responses.Admin; - -public class AdminRoomDeleteRequest { - [JsonPropertyName("new_room_user_id")] - public string? NewRoomUserId { get; set; } - - [JsonPropertyName("room_name")] - public string? RoomName { get; set; } - - [JsonPropertyName("block")] - public bool Block { get; set; } - - [JsonPropertyName("purge")] - public bool Purge { get; set; } - - [JsonPropertyName("message")] - public string? Message { get; set; } - - [JsonPropertyName("force_purge")] - public bool ForcePurge { get; set; } -} \ No newline at end of file diff --git a/LibMatrix/Responses/Admin/AdminRoomListingResult.cs b/LibMatrix/Responses/Admin/AdminRoomListingResult.cs deleted file mode 100644 index 7ab96ac..0000000 --- a/LibMatrix/Responses/Admin/AdminRoomListingResult.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Text.Json.Serialization; - -namespace LibMatrix.Responses.Admin; - -public class AdminRoomListingResult { - [JsonPropertyName("offset")] - public int Offset { get; set; } - - [JsonPropertyName("total_rooms")] - public int TotalRooms { get; set; } - - [JsonPropertyName("next_batch")] - public int? NextBatch { get; set; } - - [JsonPropertyName("prev_batch")] - public int? PrevBatch { get; set; } - - [JsonPropertyName("rooms")] - public List<AdminRoomListingResultRoom> Rooms { get; set; } = new(); - - public class AdminRoomListingResultRoom { - [JsonPropertyName("room_id")] - public required string RoomId { get; set; } - - [JsonPropertyName("name")] - public string? Name { get; set; } - - [JsonPropertyName("canonical_alias")] - public string? CanonicalAlias { get; set; } - - [JsonPropertyName("joined_members")] - public int JoinedMembers { get; set; } - - [JsonPropertyName("joined_local_members")] - public int JoinedLocalMembers { get; set; } - - [JsonPropertyName("version")] - public string? Version { get; set; } - - [JsonPropertyName("creator")] - public string? Creator { get; set; } - - [JsonPropertyName("encryption")] - public string? Encryption { get; set; } - - [JsonPropertyName("federatable")] - public bool Federatable { get; set; } - - [JsonPropertyName("public")] - public bool Public { get; set; } - - [JsonPropertyName("join_rules")] - public string? JoinRules { get; set; } - - [JsonPropertyName("guest_access")] - public string? GuestAccess { get; set; } - - [JsonPropertyName("history_visibility")] - public string? HistoryVisibility { get; set; } - - [JsonPropertyName("state_events")] - public int StateEvents { get; set; } - } -} \ No newline at end of file diff --git a/LibMatrix/Responses/LoginResponse.cs b/LibMatrix/Responses/LoginResponse.cs index 3962fa6..28fb245 100644 --- a/LibMatrix/Responses/LoginResponse.cs +++ b/LibMatrix/Responses/LoginResponse.cs @@ -21,9 +21,10 @@ public class LoginResponse { [JsonPropertyName("user_id")] public string UserId { get; set; } = null!; - public async Task<AuthenticatedHomeserverGeneric> GetAuthenticatedHomeserver(string? proxy = null) => + // public async Task<AuthenticatedHomeserverGeneric> GetAuthenticatedHomeserver(string? proxy = null) { // var urls = await new HomeserverResolverService().ResolveHomeserverFromWellKnown(Homeserver); - await AuthenticatedHomeserverGeneric.Create<AuthenticatedHomeserverGeneric>(Homeserver, AccessToken, proxy); + // await AuthenticatedHomeserverGeneric.Create<AuthenticatedHomeserverGeneric>(Homeserver, AccessToken, proxy); + // } } public class LoginRequest { |