summaryrefslogtreecommitdiffstats
path: root/webapp/components/login
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-11-21 12:15:23 -0300
committerCorey Hulen <corey@hulen.com>2016-11-21 07:15:23 -0800
commit20e931c047c7c7d1bfeb89892bdafef14c57eb73 (patch)
tree24628856cc9fba328cd44b8e0adeaa427f6ee803 /webapp/components/login
parentebb8c93baa2377b5de7579e71da168c2d76b3394 (diff)
downloadchat-20e931c047c7c7d1bfeb89892bdafef14c57eb73.tar.gz
chat-20e931c047c7c7d1bfeb89892bdafef14c57eb73.tar.bz2
chat-20e931c047c7c7d1bfeb89892bdafef14c57eb73.zip
Redirect to team when login with an invite (#4609)
Diffstat (limited to 'webapp/components/login')
-rw-r--r--webapp/components/login/login_controller.jsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index 603ec40d6..ae33e489f 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -150,8 +150,8 @@ export default class LoginController extends React.Component {
query.d,
query.h,
query.id,
- () => {
- this.finishSignin();
+ (team) => {
+ this.finishSignin(team);
},
() => {
// there's not really a good way to deal with this, so just let the user log in like normal
@@ -195,13 +195,15 @@ export default class LoginController extends React.Component {
);
}
- finishSignin() {
+ finishSignin(team) {
GlobalActions.emitInitialLoad(
() => {
const query = this.props.location.query;
GlobalActions.loadDefaultLocale();
if (query.redirect_to) {
browserHistory.push(query.redirect_to);
+ } else if (team) {
+ browserHistory.push(`/${team.name}`);
} else {
browserHistory.push('/select_team');
}