From be66f98381f50941b15bf67e7e038c597bed39b0 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 4 Sep 2018 15:35:44 +0200 Subject: [PATCH] use room method for checking power levels as it is always are of the syncing user's membership in case of lazy loading members --- src/components/views/rooms/MessageComposer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index dacd433e3eb..ad4a1dfafe6 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -309,8 +309,8 @@ export default class MessageComposer extends React.Component { ; } - const canSendMessages = !this.state.tombstone && this.props.room.currentState.maySendMessage( - MatrixClientPeg.get().credentials.userId); + const canSendMessages = !this.state.tombstone && + this.props.room.maySendMessage(); if (canSendMessages) { // This also currently includes the call buttons. Really we should