diff options
author | Elias Nahum <nahumhbl@gmail.com> | 2018-03-22 19:46:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 19:46:30 +0200 |
commit | c9e9484150fcc05ca12388c6db8b831c41f227eb (patch) | |
tree | ac083bdfbeb22a689984e0e20967e5362ecbf3f5 | |
parent | 6036ddad8598cc69511a259ffdafcce570653717 (diff) | |
download | chat-c9e9484150fcc05ca12388c6db8b831c41f227eb.tar.gz chat-c9e9484150fcc05ca12388c6db8b831c41f227eb.tar.bz2 chat-c9e9484150fcc05ca12388c6db8b831c41f227eb.zip |
MM-9853 Fix Team invite does not carry through SAML login (#8495)
-rw-r--r-- | api/user.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/api/user.go b/api/user.go index 14cc881dc..560d722a4 100644 --- a/api/user.go +++ b/api/user.go @@ -1170,7 +1170,11 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) { teamId := relayProps["team_id"] if len(teamId) > 0 { c.App.Go(func() { - c.App.AddDirectChannels(teamId, user) + if err := c.App.AddUserToTeamByTeamId(teamId, user); err != nil { + l4g.Error(err.Error()) + } else { + c.App.AddDirectChannels(teamId, user) + } }) } case model.OAUTH_ACTION_EMAIL_TO_SSO: |