diff options
author | Emma@Rory& <root@rory.gay> | 2023-08-14 19:46:33 +0200 |
---|---|---|
committer | Emma@Rory& <root@rory.gay> | 2023-08-14 19:46:33 +0200 |
commit | 83029c478f411bcadd3be53ac4dc53d88b3c8462 (patch) | |
tree | 279d62e53e55e862e4851f1447de12e47e3fce62 /MatrixRoomUtils.Web/Pages/Rooms/Create.razor | |
parent | Add MxApiExtensions submodule (diff) | |
download | MatrixUtils-83029c478f411bcadd3be53ac4dc53d88b3c8462.tar.xz |
Code cleanup
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Rooms/Create.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Pages/Rooms/Create.razor | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Create.razor b/MatrixRoomUtils.Web/Pages/Rooms/Create.razor index ebf6444..3b7d000 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Create.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Create.razor @@ -131,7 +131,7 @@ <td> @if (serverAcl?.Allow is null) { <p>No allow rules exist!</p> - <button @onclick="@(() => { serverAcl.Allow = new() { "*" }; })">Create sane defaults</button> + <button @onclick="@(() => { serverAcl.Allow = new List<string> { "*" }; })">Create sane defaults</button> } else { <details> @@ -141,7 +141,7 @@ } @if (serverAcl?.Deny is null) { <p>No deny rules exist!</p> - <button @onclick="@(() => { serverAcl.Allow = new(); })">Create sane defaults</button> + <button @onclick="@(() => { serverAcl.Allow = new List<string>(); })">Create sane defaults</button> } else { <details> @@ -240,12 +240,7 @@ @code { private string RoomPreset { - get { - if (Presets.ContainsValue(creationEvent)) { - return Presets.First(x => x.Value == creationEvent).Key; - } - return "Not a preset"; - } + get => Presets.ContainsValue(creationEvent) ? Presets.First(x => x.Value == creationEvent).Key : "Not a preset"; set { creationEvent = Presets[value]; JsonChanged(); @@ -310,7 +305,7 @@ creationEvent.InitialState.Add(new StateEvent { Type = "m.room.member", StateKey = mxid, - TypedContent = new RoomMemberEventData() { + TypedContent = new RoomMemberEventData { Membership = "invite", Reason = "Automatically invited at room creation time." } |