Forbid sending empty messages

And don't render any elements for them.
This commit is contained in:
Fang 2019-07-28 23:21:03 +02:00
parent c4ad4aa247
commit 716af367bf
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 7 additions and 0 deletions

View File

@ -194,6 +194,10 @@ export class ChatInput extends Component {
messageSubmit() {
const { props, state } = this;
if (state.message === '') {
return;
}
let message = {
uid: uuid(),
aut: window.ship,

View File

@ -29,6 +29,9 @@ export class Message extends Component {
}
renderLin(content, action = false) {
if (content === '') {
return null;
}
//TODO remove once arvo:// urls are supported in url speeches
if (content.indexOf('arvo://') === 0) {
return this.renderUrl(content);