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

Commit

Permalink
Fix fallback value for missing invite power level (#8335)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jplatte authored Apr 15, 2022
1 parent d162e02 commit 1afecc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
},
"invite": {
desc: _t('Invite users'),
defaultValue: 50,
defaultValue: 0,
},
"state_default": {
desc: _t('Change settings'),
Expand Down

0 comments on commit 1afecc4

Please sign in to comment.