Migrate User.GetProfileByIds to sync by default (#11510)

Этот коммит содержится в:
Rodrigo Villablanca Vásquez
2019-07-04 05:57:12 -04:00
коммит произвёл Jesús Espino
родитель c0c93a1b09
Коммит b738e02c15
7 изменённых файлов: 121 добавлений и 109 удалений

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

@@ -66,8 +66,8 @@ func replaceUserIds(userStore store.UserStore, text string) string {
userIds = append(userIds, match[1])
}
if res := <-userStore.GetProfileByIds(userIds, nil, true); res.Err == nil {
for _, user := range res.Data.([]*model.User) {
if users, err := userStore.GetProfileByIds(userIds, nil, true); err == nil {
for _, user := range users {
text = strings.Replace(text, "<@"+user.Id+">", "@"+user.Username, -1)
}
}