MM-15290: Migrate commandStore.GetByTrigger to sync by default (#10741)

* MM-15290: migrate command.GetByTrigger to sync by default

* Fix build

* MM-15290: fix go vet issue
Этот коммит содержится в:
Puneeth Reddy
2019-05-07 11:44:30 -07:00
коммит произвёл Jesús Espino
родитель 9ab3cc9051
Коммит 6ce3cc6921
5 изменённых файлов: 36 добавлений и 31 удалений

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

@@ -46,11 +46,10 @@ func getCommandFromCommandArg(a *app.App, commandArg string) *model.Command {
if team == nil {
return nil
}
if result := <-a.Srv.Store.Command().GetByTrigger(team.Id, commandPart); result.Err == nil {
command = result.Data.(*model.Command)
} else {
fmt.Println(result.Err.Error())
var err *model.AppError
command, err = a.Srv.Store.Command().GetByTrigger(team.Id, commandPart)
if err != nil {
fmt.Println(err.Error())
}
}