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
This commit is contained in:
Jonas Platte 2022-04-15 16:29:41 +02:00 committed by GitHub
parent d162e021e1
commit 1afecc474f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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,
});

View file

@ -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'),