Migrate FileInfo store to Sync by default (#10837)

Этот коммит содержится в:
Jesús Espino
2019-05-15 22:07:03 +02:00
коммит произвёл GitHub
родитель 99ea780f20
Коммит beb7592c93
17 изменённых файлов: 462 добавлений и 459 удалений

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

@@ -30,10 +30,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)
var fchan store.StoreChannel
var fchan chan store.StoreResult
if len(post.FileIds) != 0 {
fchan = a.Srv.Store.FileInfo().GetForPost(post.Id, true, true)
fchan = make(chan store.StoreResult, 1)
go func() {
fileInfos, err := a.Srv.Store.FileInfo().GetForPost(post.Id, true, true)
fchan <- store.StoreResult{Data: fileInfos, Err: err}
close(fchan)
}()
}
result := <-pchan