summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJaehyun, Park <kkamdooong@gmail.com>2017-06-29 23:38:56 +0900
committerHarrison Healey <harrisonmhealey@gmail.com>2017-06-29 10:38:56 -0400
commit50b662040c5c2e2544b3517dc766f1837c7f05e1 (patch)
tree00130bf07a32a644c7802ebb5a3184f0eb634881 /webapp
parent94e734c1bdc2f7e377a469c57add45cf9261fba7 (diff)
downloadchat-50b662040c5c2e2544b3517dc766f1837c7f05e1.tar.gz
chat-50b662040c5c2e2544b3517dc766f1837c7f05e1.tar.bz2
chat-50b662040c5c2e2544b3517dc766f1837c7f05e1.zip
Add /help slash command (#6650)
* Add /help slash command * Fix copyright year * go fmt * Add help command test at api4 * Fix jasonblais's issue * Update test code * Fix unit test issue - keep config unchanged
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/create_comment.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx
index 56e9eb88f..2ddc828cc 100644
--- a/webapp/components/create_comment.jsx
+++ b/webapp/components/create_comment.jsx
@@ -203,7 +203,11 @@ export default class CreateComment extends React.Component {
(data) => {
this.setState({submitting: false});
if (data.goto_location && data.goto_location.length > 0) {
- browserHistory.push(data.goto_location);
+ if (data.goto_location.startsWith('/') || data.goto_location.includes(window.location.hostname)) {
+ browserHistory.push(data.goto_location);
+ } else {
+ window.open(data.goto_location);
+ }
}
},
(err) => {