replaced deprecated function with the new one to check for power levels

This commit is contained in:
Mauro Romito
2025-07-22 16:17:48 +02:00
parent 1db7169d4e
commit 1a23b84882
22 changed files with 64 additions and 51 deletions
@@ -176,7 +176,7 @@ Please see LICENSE in the repository root for full details.
// Check whether the user has enough power to rename the room
MXRoomPowerLevels *powerLevels = _mxRoom.dangerousSyncState.powerLevels;
NSInteger userPowerLevel = [powerLevels powerLevelOfUserWithUserID:_mxRoom.mxSession.myUser.userId];
NSInteger userPowerLevel = [_mxRoom.dangerousSyncState powerLevelOfUserWithUserID:_mxRoom.mxSession.myUser.userId];
if (userPowerLevel >= [powerLevels minimumPowerLevelForSendingEventAsStateEvent:kMXEventTypeStringRoomName])
{
// Only the room name is edited here, update the text field with the room name