Migrate Reactions store to Sync by default (#10737)
* Migrate Reactions store to Sync by default * Fixing tests * Fixing tests * Fixing govet * fixing tests * Addressing PR review comments
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
584ec68755
Коммит
9a9d5d4081
@@ -407,15 +407,14 @@ func (a *App) buildPostReplies(postId string) (*[]ReplyImportData, *model.AppErr
|
||||
func (a *App) BuildPostReactions(postId string) (*[]ReactionImportData, *model.AppError) {
|
||||
var reactionsOfPost []ReactionImportData
|
||||
|
||||
result := <-a.Srv.Store.Reaction().GetForPost(postId, true)
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
reactions, err := a.Srv.Store.Reaction().GetForPost(postId, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
reactions := result.Data.([]*model.Reaction)
|
||||
|
||||
for _, reaction := range reactions {
|
||||
user, err := a.Srv.Store.User().Get(reaction.UserId)
|
||||
var user *model.User
|
||||
user, err = a.Srv.Store.User().Get(reaction.UserId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user