Unverified Commit 62495f63 authored by Sudheer's avatar Sudheer Committed by cpanato

MM-13504 Fix for invite link to land in the team on login (#2200)

parent c2cdb848
......@@ -270,7 +270,7 @@ class LoginController extends React.Component {
submit = (loginId, password, token) => {
this.setState({serverError: null, loading: true});
this.props.actions.login(loginId, password, token).then(({error}) => {
this.props.actions.login(loginId, password, token).then(async ({error}) => {
if (error) {
if (error.server_error_id === 'api.user.login.not_verified.app_error') {
browserHistory.push('/should_verify_email?&email=' + encodeURIComponent(loginId));
......@@ -310,7 +310,7 @@ class LoginController extends React.Component {
const inviteId = params.get('id') || '';
if (inviteId || inviteToken) {
const {data: team} = this.props.actions.addUserToTeamFromInvite(inviteToken, inviteId);
const {data: team} = await this.props.actions.addUserToTeamFromInvite(inviteToken, inviteId);
if (team) {
this.finishSignin(team);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment