[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

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

@@ -47,6 +47,8 @@ type FeatureFlags struct {
// Enable different treatments for first time users, possible values = ("none", "tips_and_next_steps")
DownloadAppsCTA string
// Determine whether when a user gets created, they'll have noisy notifications e.g. Send desktop notifications for all activity
NewAccountNoisy bool
// Enable Boards Unfurl Preview
BoardsUnfurl bool
@@ -71,6 +73,7 @@ func (f *FeatureFlags) SetDefaults() {
f.AddChannelButton = "by_team_name"
f.PrewrittenMessages = "tour_point"
f.DownloadAppsCTA = "tips_and_next_steps"
f.NewAccountNoisy = false
f.BoardsUnfurl = true
f.CallsMobile = false
f.AutoTour = "none"