From f866946fbbe962c712049327ade9dcbd43900295 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 25 Jun 2023 03:07:05 +0200 Subject: Working state, refactored Rory&::LibMatrix --- MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs | 2 +- .../Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'MatrixRoomUtils.Web/Classes') diff --git a/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs b/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs index 878eca4..59ec4db 100644 --- a/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs +++ b/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs @@ -21,7 +21,7 @@ public class LocalStorageWrapper { Console.WriteLine("Access token is not null, creating authenticated home server"); Console.WriteLine($"Homeserver cache: {RuntimeCache.HomeserverResolutionCache.Count} entries"); // Console.WriteLine(RuntimeCache.HomeserverResolutionCache.ToJson()); - RuntimeCache.CurrentHomeServer = await new AuthenticatedHomeServer(RuntimeCache.LoginSessions[RuntimeCache.LastUsedToken].LoginResponse.HomeServer, RuntimeCache.LastUsedToken, TODO).Configure(); + RuntimeCache.CurrentHomeServer = await new AuthenticatedHomeServer(RuntimeCache.LoginSessions[RuntimeCache.LastUsedToken].LoginResponse.HomeServer, RuntimeCache.LastUsedToken, null).Configure(); Console.WriteLine("Created authenticated home server"); } } diff --git a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs index 77c8281..47844e3 100644 --- a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs +++ b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs @@ -1,6 +1,7 @@ using System.Text.Json.Nodes; using MatrixRoomUtils.Core; using MatrixRoomUtils.Core.Responses; +using MatrixRoomUtils.Core.StateEventTypes; namespace MatrixRoomUtils.Web.Classes.RoomCreationTemplates; @@ -18,9 +19,9 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate { history_visibility = "world_readable" } }, - new StateEvent { + new StateEvent { Type = "m.room.guest_access", - Content = new Pages.RoomManager.RoomManagerCreateRoom.GuestAccessContent { + Content = new GuestAccessData { GuestAccess = "can_join" } }, -- cgit 1.5.1