Skip to content

Commit

Permalink
Fix fallback value for missing invite power level
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 committed Apr 15, 2022
1 parent 77b0add commit 08845c8
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 08845c8

Please sign in to comment.