From da902ef8bacb0751c7bd681abdc58039812d6430 Mon Sep 17 00:00:00 2001
From: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Date: Tue, 28 Feb 2017 10:36:45 +0100
Subject: Slash command: goto_location not working as expected (#5507)

---
 webapp/components/create_post.jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'webapp/components/create_post.jsx')

diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx
index 7bdcf6888..ef85aca12 100644
--- a/webapp/components/create_post.jsx
+++ b/webapp/components/create_post.jsx
@@ -133,7 +133,11 @@ export default class CreatePost extends React.Component {
                     }
 
                     if (data.goto_location && data.goto_location.length > 0) {
-                        browserHistory.push(data.goto_location);
+                        if (data.goto_location.startsWith('/')) {
+                            browserHistory.push(data.goto_location);
+                        } else {
+                            window.open(data.goto_location);
+                        }
                     }
                 },
                 (err) => {
-- 
cgit v1.2.3-1-g7c22

