MM-13190: Fix NotifyProps in Bulk Import. (#9900)

If some, but not all, notify props are specified for a user in the bulk
import data, and that is a newly created user, we must explicitly
initialise all the other notify props to their default values to avoid
breaking client assumptions.
Этот коммит содержится в:
George Goldberg
2018-11-28 15:28:51 +00:00
коммит произвёл GitHub
родитель 415036ee8d
Коммит 9730b46bca
2 изменённых файлов: 43 добавлений и 1 удалений

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

@@ -279,6 +279,7 @@ func (a *App) ImportUser(data *UserImportData, dryRun bool) *model.AppError {
} else {
user = &model.User{}
user.MakeNonNil()
user.SetDefaultNotifications()
hasUserChanged = true
}