[MM-16170] Migrate Team.GetTeamsByUserId to Sync by default (#11100)

* [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default

* Fixing comments
Этот коммит содержится в:
Mounica Paladugu
2019-07-09 09:21:18 -07:00
коммит произвёл Joram Wilander
родитель 0ec609d159
Коммит ff89b2c8e1
9 изменённых файлов: 36 добавлений и 38 удалений

Просмотреть файл

@@ -22,13 +22,12 @@ func (a *App) sendNotificationEmail(notification *postNotification, user *model.
post := notification.post
if channel.IsGroupOrDirect() {
result := <-a.Srv.Store.Team().GetTeamsByUserId(user.Id)
if result.Err != nil {
return result.Err
teams, err := a.Srv.Store.Team().GetTeamsByUserId(user.Id)
if err != nil {
return err
}
// if the recipient isn't in the current user's team, just pick one
teams := result.Data.([]*model.Team)
found := false
for i := range teams {