parent
83c6914a50
commit
ecc4a40eea
2 changed files with 14 additions and 0 deletions
|
@ -327,7 +327,15 @@ function RoomViewInput({
|
|||
if (file !== null) roomsInput.setAttachment(roomId, file);
|
||||
}
|
||||
|
||||
const myPowerlevel = roomTimeline.room.getMember(mx.getUserId()).powerLevel;
|
||||
const canISend = roomTimeline.room.currentState.hasSufficientPowerLevelFor('events_default', myPowerlevel);
|
||||
|
||||
function renderInputs() {
|
||||
if (!canISend) {
|
||||
return (
|
||||
<p className="room-input__disallowed">You do not have permission to post to this room</p>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<div className={`room-input__option-container${attachment === null ? '' : ' room-attachment__option'}`}>
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
display: flex;
|
||||
min-height: 48px;
|
||||
|
||||
&__disallowed {
|
||||
color: var(--tc-surface-low);
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__space {
|
||||
min-width: 0;
|
||||
align-self: center;
|
||||
|
|
Loading…
Reference in a new issue