diff --git a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
index bb2eab9..3f67f33 100644
--- a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
+++ b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs
@@ -2,7 +2,6 @@ using System.Text.Json.Nodes;
using LibMatrix;
using LibMatrix.Responses;
using LibMatrix.StateEventTypes.Spec;
-using LibMatrix.StateEventTypes;
namespace MatrixRoomUtils.Web.Classes.RoomCreationTemplates;
@@ -16,39 +15,39 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate {
InitialState = new List<StateEvent> {
new() {
Type = "m.room.history_visibility",
- TypedContent = new {
- history_visibility = "world_readable"
+ TypedContent = new HistoryVisibilityEventContent() {
+ HistoryVisibility = "world_readable"
}
},
new() {
Type = "m.room.guest_access",
- TypedContent = new GuestAccessEventData {
+ TypedContent = new GuestAccessEventContent {
GuestAccess = "can_join"
}
},
new() {
Type = "m.room.join_rules",
- TypedContent = new JoinRulesEventData {
+ TypedContent = new JoinRulesEventContent {
JoinRule = "public"
}
},
new() {
Type = "m.room.server_acl",
- TypedContent = new {
- allow = new[] { "*" },
- deny = Array.Empty<string>(),
- allow_ip_literals = false
+ TypedContent = new ServerACLEventContent() {
+ Allow = new List<string>() { "*" },
+ Deny = new List<string>(),
+ AllowIpLiterals = false
}
},
new() {
Type = "m.room.avatar",
- TypedContent = new RoomAvatarEventData {
+ TypedContent = new RoomAvatarEventContent {
Url = "mxc://feline.support/UKNhEyrVsrAbYteVvZloZcFj"
}
}
},
Visibility = "public",
- PowerLevelContentOverride = new RoomPowerLevelEventData {
+ PowerLevelContentOverride = new RoomPowerLevelEventContent {
UsersDefault = 0,
EventsDefault = 100,
StateDefault = 50,
@@ -56,10 +55,10 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate {
Redact = 50,
Kick = 50,
Ban = 50,
- NotificationsPl = new RoomPowerLevelEventData.NotificationsPL {
+ NotificationsPl = new RoomPowerLevelEventContent.NotificationsPL {
Room = 50
},
- Events = new Dictionary<string, int> {
+ Events = new() {
{ "im.vector.modular.widgets", 50 },
{ "io.element.voice_broadcast_info", 50 },
{ "m.reaction", 100 },
@@ -78,7 +77,7 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate {
{ "org.matrix.msc3401.call", 50 },
{ "org.matrix.msc3401.call.member", 50 }
},
- Users = new Dictionary<string, int> {
+ Users = new() {
// { RuntimeCache.CurrentHomeServer.UserId, 100 }
//TODO: re-implement this
}
|