Fix unable to send msg in DM from IRC users (#135)
authorkfiven <33421343+kfiven@users.noreply.github.com>
Sun, 10 Oct 2021 14:03:20 +0000 (19:33 +0530)
committerAjay Bura <32841439+ajbura@users.noreply.github.com>
Mon, 11 Oct 2021 05:49:32 +0000 (11:19 +0530)
src/app/organisms/room/RoomViewInput.jsx

index 6c354edab5b42a53391de0215d685212170fab3b..5ca4fdd3edae37683793c7e21e1fa15385ab461b 100644 (file)
@@ -327,8 +327,7 @@ 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);
+  const canISend = roomTimeline.room.currentState.maySendMessage(mx.getUserId());
 
   function renderInputs() {
     if (!canISend) {