diff --git a/src/app/organisms/room/RoomViewInput.jsx b/src/app/organisms/room/RoomViewInput.jsx index edad9c99..6c354eda 100644 --- a/src/app/organisms/room/RoomViewInput.jsx +++ b/src/app/organisms/room/RoomViewInput.jsx @@ -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 ( + You do not have permission to post to this room + ); + } return ( <>
diff --git a/src/app/organisms/room/RoomViewInput.scss b/src/app/organisms/room/RoomViewInput.scss index 112a4c4a..9e0f1a91 100644 --- a/src/app/organisms/room/RoomViewInput.scss +++ b/src/app/organisms/room/RoomViewInput.scss @@ -3,6 +3,11 @@ display: flex; min-height: 48px; + &__disallowed { + flex: 1; + text-align: center; + } + &__space { min-width: 0; align-self: center;