From 15f54a1078bf272ef2ebb9bf29d039904fde6edf Mon Sep 17 00:00:00 2001
From: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Date: Mon, 6 Mar 2017 14:00:40 +0100
Subject: fix bug when use /msg command it open the channel in a new tab
 (#5644)

---
 webapp/components/create_post.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

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

