about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-02 01:01:09 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-02 01:01:09 +0200
commitdef33cc092ae2c6defcc218b108b7c99cbfb8581 (patch)
treeba992ff8c30b7d4e8af0a78350e157e095455a18 /MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
parentDeduplicate some api calls (diff)
downloadMatrixUtils-def33cc092ae2c6defcc218b108b7c99cbfb8581.tar.xz
Prefetch room info
Diffstat (limited to 'MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs')
-rw-r--r--MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
index ca6345f..a519977 100644
--- a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
+++ b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
@@ -2,6 +2,7 @@ using System.Text.Json.Nodes;
 using MatrixRoomUtils.Core;
 using MatrixRoomUtils.Core.Responses;
 using MatrixRoomUtils.Core.StateEventTypes;
+using MatrixRoomUtils.Core.StateEventTypes.Spec;
 
 namespace MatrixRoomUtils.Web.Classes.RoomCreationTemplates;
 
@@ -9,7 +10,7 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate {
     public string Name => "Default";
 
     public CreateRoomRequest CreateRoomRequest =>
-        new CreateRoomRequest {
+        new() {
             Name = "My new room",
             RoomAliasName = "myroom",
             InitialState = new List<StateEvent> {
@@ -21,7 +22,7 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate {
                 },
                 new() {
                     Type = "m.room.guest_access",
-                    TypedContent = new GuestAccessData {
+                    TypedContent = new GuestAccessEventData {
                         GuestAccess = "can_join"
                     }
                 },
@@ -47,7 +48,7 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate {
                 }
             },
             Visibility = "public",
-            PowerLevelContentOverride = new PowerLevelEvent {
+            PowerLevelContentOverride = new PowerLevelEventData {
                 UsersDefault = 0,
                 EventsDefault = 100,
                 StateDefault = 50,
@@ -55,7 +56,7 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate {
                 Redact = 50,
                 Kick = 50,
                 Ban = 50,
-                NotificationsPl = new PowerLevelEvent.NotificationsPL {
+                NotificationsPl = new PowerLevelEventData.NotificationsPL {
                     Room = 50
                 },
                 Events = new Dictionary<string, int> {