diff options
author | George Goldberg <george@gberg.me> | 2017-05-10 14:08:06 +0100 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-05-10 09:08:06 -0400 |
commit | a67898186175d9986b9e8cd8321afbc6fa84c8c6 (patch) | |
tree | 09d7be5f70dd2c0732a92ef06c322bd09506cdf3 /app/team.go | |
parent | 7a927c03e4cfe8f14d254219ec54f76c2349598e (diff) | |
download | chat-a67898186175d9986b9e8cd8321afbc6fa84c8c6.tar.gz chat-a67898186175d9986b9e8cd8321afbc6fa84c8c6.tar.bz2 chat-a67898186175d9986b9e8cd8321afbc6fa84c8c6.zip |
PLT-6488: Reduce database queries in user bulk import. (#6371)
Diffstat (limited to 'app/team.go')
-rw-r--r-- | app/team.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/team.go b/app/team.go index 41e24bf52..acc3966b9 100644 --- a/app/team.go +++ b/app/team.go @@ -286,10 +286,6 @@ func joinUserToTeam(team *model.Team, user *model.User) (bool, *model.AppError) } } - if uua := <-Srv.Store.User().UpdateUpdateAt(user.Id); uua.Err != nil { - return false, uua.Err - } - return false, nil } @@ -300,6 +296,10 @@ func JoinUserToTeam(team *model.Team, user *model.User, userRequestorId string) return nil } + if uua := <-Srv.Store.User().UpdateUpdateAt(user.Id); uua.Err != nil { + return uua.Err + } + channelRole := model.ROLE_CHANNEL_USER.Id if team.Email == user.Email { |