Migrate 'Channel.GetAllChannelMembersNotifyPropsForChannel' to Sync by default (#11248)

Этот коммит содержится в:
Shota Gvinepadze
2019-06-18 17:56:29 +04:00
коммит произвёл Jesús Espino
родитель 406dcb1311
Коммит 075eadb040
5 изменённых файлов: 56 добавлений и 49 удалений

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

@@ -29,7 +29,14 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
}
pchan := a.Srv.Store.User().GetAllProfilesInChannel(channel.Id, true)
cmnchan := a.Srv.Store.Channel().GetAllChannelMembersNotifyPropsForChannel(channel.Id, true)
cmnchan := make(chan store.StoreResult, 1)
go func() {
props, err := a.Srv.Store.Channel().GetAllChannelMembersNotifyPropsForChannel(channel.Id, true)
cmnchan <- store.StoreResult{Data: props, Err: err}
close(cmnchan)
}()
var fchan chan store.StoreResult
if len(post.FileIds) != 0 {
fchan = make(chan store.StoreResult, 1)