MM-35133 trigger sync user immediately after change (#17579)

- ensure changes to user profile sync immediately
- refactor sync send
Этот коммит содержится в:
Doug Lauder
2021-05-20 12:07:40 -04:00
коммит произвёл GitHub
родитель 36dd0005d2
Коммит 2b02b03497
31 изменённых файлов: 1591 добавлений и 914 удалений

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

@@ -981,6 +981,7 @@ func (a *App) SetProfileImageFromFile(userID string, file io.Reader) *model.AppE
mlog.Warn("Error with updating last picture update", mlog.Err(err))
}
a.invalidateUserCacheAndPublish(userID)
a.onUserProfileChange(userID)
return nil
}
@@ -1311,6 +1312,7 @@ func (a *App) UpdateUser(user *model.User, sendNotifications bool) (*model.User,
}
a.InvalidateCacheForUser(user.Id)
a.onUserProfileChange(user.Id)
return userUpdate.New, nil
}