Merge pull request #3377 from matrix-org/bwindels/cider-noemptymsg

New composer: dont allow sending empty messages
pull/21833/head
Bruno Windels 2019-09-02 14:57:41 +00:00 committed by GitHub
commit eaed07fcbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -203,6 +203,9 @@ export default class SendMessageComposer extends React.Component {
} }
_sendMessage() { _sendMessage() {
if (this.model.isEmpty) {
return;
}
if (!containsEmote(this.model) && this._isSlashCommand()) { if (!containsEmote(this.model) && this._isSlashCommand()) {
this._runSlashCommand(); this._runSlashCommand();
} else { } else {