diff --git a/react/features/chat/components/web/ChatInput.js b/react/features/chat/components/web/ChatInput.js index f5085d098..e6244cb2f 100644 --- a/react/features/chat/components/web/ChatInput.js +++ b/react/features/chat/components/web/ChatInput.js @@ -157,9 +157,13 @@ class ChatInput extends Component { && event.shiftKey === false) { event.preventDefault(); - this.props.dispatch(sendMessage(this.state.message)); + const trimmed = this.state.message.trim(); - this.setState({ message: '' }); + if (trimmed) { + this.props.dispatch(sendMessage(trimmed)); + + this.setState({ message: '' }); + } } }