From 47ab7f96aaa798172c0f8f5afd09674545923b83 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Mon, 2 Jan 2023 13:30:41 -0800 Subject: [PATCH 1/2] Allow messages only containing backticks to be created --- src/pages/home/report/ReportActionCompose.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 58d280455a93..1825d78b7128 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -393,7 +393,7 @@ class ReportActionCompose extends React.Component { const newComment = EmojiUtils.replaceEmojis(comment, this.props.isSmallScreenWidth); this.setState((prevState) => { const newState = { - isCommentEmpty: !!newComment.match(/^(\s|`)*$/), + isCommentEmpty: !!newComment.match(/^(\s)*$/), value: newComment, }; if (comment !== newComment) { @@ -465,6 +465,7 @@ class ReportActionCompose extends React.Component { */ prepareCommentAndResetComposer() { const trimmedComment = this.comment.trim(); + console.log('!!!', trimmedComment, this.state.isCommentEmpty) // Don't submit empty comments or comments that exceed the character limit if (this.state.isCommentEmpty || trimmedComment.length > CONST.MAX_COMMENT_LENGTH) { From 280e01d71fcde8614d8009839ded31ac0e17ab84 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Mon, 2 Jan 2023 13:31:28 -0800 Subject: [PATCH 2/2] Remove debug code --- src/pages/home/report/ReportActionCompose.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 1825d78b7128..1d60d3d8fdb4 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -465,7 +465,6 @@ class ReportActionCompose extends React.Component { */ prepareCommentAndResetComposer() { const trimmedComment = this.comment.trim(); - console.log('!!!', trimmedComment, this.state.isCommentEmpty) // Don't submit empty comments or comments that exceed the character limit if (this.state.isCommentEmpty || trimmedComment.length > CONST.MAX_COMMENT_LENGTH) {