fix bug when use /msg command it open the channel in a new tab (#5644)

This commit is contained in:
Carlos Tadeu Panato Junior
2017-03-06 14:00:40 +01:00
committed by enahum
parent 615d116c45
commit 15f54a1078

View File

@@ -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);