From 1afecc474fd3a85248bf3a833b008d7b2c46d959 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 15 Apr 2022 16:29:41 +0200 Subject: [PATCH] Fix fallback value for missing invite power level (#8335) The spec was recently amended to document that invites actually fall back to a default of 0, rather than 50 (since this is what Synapse was doing all along): https://github.com/matrix-org/matrix-spec/pull/1021 --- src/components/views/right_panel/UserInfo.tsx | 2 +- .../views/settings/tabs/room/RolesRoomSettingsTab.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 93ab84e902..25d54da463 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -942,7 +942,7 @@ function useRoomPermissions(cli: MatrixClient, room: Room, user: RoomMember): IR } setRoomPermissions({ - canInvite: me.powerLevel >= (powerLevels.invite ?? 50), + canInvite: me.powerLevel >= (powerLevels.invite ?? 0), canEdit: modifyLevelMax >= 0, modifyLevelMax, }); diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx index e519ec0bf7..85cafc37b8 100644 --- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx @@ -262,7 +262,7 @@ export default class RolesRoomSettingsTab extends React.Component { }, "invite": { desc: _t('Invite users'), - defaultValue: 50, + defaultValue: 0, }, "state_default": { desc: _t('Change settings'),