[MM-39053] - A/B test for default notification settings (#18655)

* [MM-39053] - A/B test for default notification settings

* fix tests

* first name notifications on

* update

* Fix bad merge alignment

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Этот коммит содержится в:
Allan Guwatudde
2021-10-21 14:00:25 +03:00
коммит произвёл GitHub
родитель ff4df47cb1
Коммит 246a0c297e
2 изменённых файлов: 12 добавлений и 0 удалений

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

@@ -63,6 +63,15 @@ func (us *UserService) createUser(user *model.User) (*model.User, error) {
return nil, err
}
if us.config().FeatureFlags.NewAccountNoisy {
user.SetDefaultNotifications()
user.NotifyProps[model.DesktopNotifyProp] = model.UserNotifyAll
user.NotifyProps[model.PushNotifyProp] = model.UserNotifyAll
user.NotifyProps[model.ChannelMentionsNotifyProp] = "true"
user.NotifyProps[model.MentionKeysNotifyProp] = user.Username
user.NotifyProps[model.FirstNameNotifyProp] = "true"
}
ruser, err := us.store.Save(user)
if err != nil {
return nil, err