Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1afecc4

Browse files
authored
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): matrix-org/matrix-spec#1021
1 parent d162e02 commit 1afecc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/views/right_panel/UserInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ function useRoomPermissions(cli: MatrixClient, room: Room, user: RoomMember): IR
942942
}
943943

944944
setRoomPermissions({
945-
canInvite: me.powerLevel >= (powerLevels.invite ?? 50),
945+
canInvite: me.powerLevel >= (powerLevels.invite ?? 0),
946946
canEdit: modifyLevelMax >= 0,
947947
modifyLevelMax,
948948
});

src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
262262
},
263263
"invite": {
264264
desc: _t('Invite users'),
265-
defaultValue: 50,
265+
defaultValue: 0,
266266
},
267267
"state_default": {
268268
desc: _t('Change settings'),

0 commit comments

Comments
 (0)