mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
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:
parent
d162e021e1
commit
1afecc474f
2 changed files with 2 additions and 2 deletions
|
@ -942,7 +942,7 @@ function useRoomPermissions(cli: MatrixClient, room: Room, user: RoomMember): IR
|
||||||
}
|
}
|
||||||
|
|
||||||
setRoomPermissions({
|
setRoomPermissions({
|
||||||
canInvite: me.powerLevel >= (powerLevels.invite ?? 50),
|
canInvite: me.powerLevel >= (powerLevels.invite ?? 0),
|
||||||
canEdit: modifyLevelMax >= 0,
|
canEdit: modifyLevelMax >= 0,
|
||||||
modifyLevelMax,
|
modifyLevelMax,
|
||||||
});
|
});
|
||||||
|
|
|
@ -262,7 +262,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
|
||||||
},
|
},
|
||||||
"invite": {
|
"invite": {
|
||||||
desc: _t('Invite users'),
|
desc: _t('Invite users'),
|
||||||
defaultValue: 50,
|
defaultValue: 0,
|
||||||
},
|
},
|
||||||
"state_default": {
|
"state_default": {
|
||||||
desc: _t('Change settings'),
|
desc: _t('Change settings'),
|
||||||
|
|
Loading…
Reference in a new issue