summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/react/components/create_post.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index 7bc5e2481..a3e354599 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -71,6 +71,11 @@ module.exports = React.createClass({
post.root_id = this.state.rootId;
post.parent_id = this.state.parentId;
+ // if this is a reply, trim off any carets from the beginning of a message
+ if (post.root_id && post.message.startsWith("^")) {
+ post.message = post.message.replace(/^\^+\s*/g, "");
+ }
+
client.createPost(post, ChannelStore.getCurrent(),
function(data) {
PostStore.storeDraft(data.channel_id, data.user_id, null);