From 779ced6da10e35df9273b95928ed182cddecee27 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sat, 2 Dec 2023 22:36:15 +0100 Subject: Reformat --- MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs | 2 +- MatrixRoomUtils.Web/Classes/RoomInfo.cs | 2 +- MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj | 13 ++----------- MatrixRoomUtils.Web/Pages/Tools/CopyPowerlevel.razor | 2 +- .../Pages/User/DMSpaceStages/DMSpaceStage1.razor | 2 +- 5 files changed, 6 insertions(+), 15 deletions(-) (limited to 'MatrixRoomUtils.Web') diff --git a/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs b/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs index 2c3b9ce..fb3b041 100644 --- a/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs +++ b/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs @@ -95,4 +95,4 @@ public class MRUStorageWrapper(TieredStorageService storageService, HomeserverPr } public async Task SetCurrentToken(UserAuth? auth) => await storageService.DataStorageProvider.SaveObjectAsync("token", auth); -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Classes/RoomInfo.cs b/MatrixRoomUtils.Web/Classes/RoomInfo.cs index 37973a0..a8c3848 100644 --- a/MatrixRoomUtils.Web/Classes/RoomInfo.cs +++ b/MatrixRoomUtils.Web/Classes/RoomInfo.cs @@ -89,4 +89,4 @@ public class RoomInfo : NotifyPropertyChanged { } }; } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj b/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj index e5ca180..68fb9c7 100644 --- a/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj +++ b/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj @@ -19,19 +19,10 @@ - - - + + - - - - - - - - diff --git a/MatrixRoomUtils.Web/Pages/Tools/CopyPowerlevel.razor b/MatrixRoomUtils.Web/Pages/Tools/CopyPowerlevel.razor index aaeb5a3..bcbc974 100644 --- a/MatrixRoomUtils.Web/Pages/Tools/CopyPowerlevel.razor +++ b/MatrixRoomUtils.Web/Pages/Tools/CopyPowerlevel.razor @@ -58,7 +58,7 @@ try { var pls = await room.GetPowerLevelsAsync(); // if (pls.GetUserPowerLevel(hs.WhoAmI.UserId) == pls.UsersDefault) return "I am default PL in " + room.RoomId; - if (!pls.UserHasPermission(hs.WhoAmI.UserId, RoomPowerLevelEventContent.EventId)) return "I do not have permission to send PL in " + room.RoomId; + if (!pls.UserHasStatePermission(hs.WhoAmI.UserId, RoomPowerLevelEventContent.EventId)) return "I do not have permission to send PL in " + room.RoomId; foreach (var ahs in hss) { if (pls.GetUserPowerLevel(hs.WhoAmI.UserId) == pls.GetUserPowerLevel(ahs.WhoAmI.UserId)) { log.Add("I am same PL in " + room.RoomId); diff --git a/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor b/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor index 3642da5..f953f76 100644 --- a/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor +++ b/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor @@ -97,7 +97,7 @@ else { public async Task<(string id, string name)?> GetFeasibleSpaces(GenericRoom room) { try { var pls = await room.GetPowerLevelsAsync(); - if (!pls.UserHasPermission(DmSpace.Homeserver.WhoAmI.UserId, "m.space.child")) { + if (!pls.UserHasStatePermission(DmSpace.Homeserver.WhoAmI.UserId, "m.space.child")) { Console.WriteLine($"No permission to send m.space.child in {room.RoomId}..."); return null; } -- cgit 1.5.1