mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 18:16:30 +03:00
Forbid sending empty messages
And don't render any elements for them.
This commit is contained in:
parent
c4ad4aa247
commit
716af367bf
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user