mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 05:45:46 +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() {
|
messageSubmit() {
|
||||||
const { props, state } = this;
|
const { props, state } = this;
|
||||||
|
|
||||||
|
if (state.message === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let message = {
|
let message = {
|
||||||
uid: uuid(),
|
uid: uuid(),
|
||||||
aut: window.ship,
|
aut: window.ship,
|
||||||
|
@ -29,6 +29,9 @@ export class Message extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderLin(content, action = false) {
|
renderLin(content, action = false) {
|
||||||
|
if (content === '') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
//TODO remove once arvo:// urls are supported in url speeches
|
//TODO remove once arvo:// urls are supported in url speeches
|
||||||
if (content.indexOf('arvo://') === 0) {
|
if (content.indexOf('arvo://') === 0) {
|
||||||
return this.renderUrl(content);
|
return this.renderUrl(content);
|
||||||
|
Loading…
Reference in New Issue
Block a user