diff options
author | Chris Duarte <csduarte@users.noreply.github.com> | 2017-12-21 12:50:25 -0800 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-12-21 15:50:25 -0500 |
commit | 5189e8ea105712a9d561d0dade80932cc2c0ccf9 (patch) | |
tree | 9005d09f8e1aea211304e01b80995b6d8b503f5a | |
parent | 522f21e69876477de486ed575417df507d7b07b0 (diff) | |
download | chat-5189e8ea105712a9d561d0dade80932cc2c0ccf9.tar.gz chat-5189e8ea105712a9d561d0dade80932cc2c0ccf9.tar.bz2 chat-5189e8ea105712a9d561d0dade80932cc2c0ccf9.zip |
UCHAT-60 change default notification settings for new users (#7845)
* UCHAT-60 change default notification settings for new users
* 1. Turn off "Case sensitive first name" in Words that trigger mentions. 2. Send Desktop Notifications for "Only for mentions and direct messages".
-rw-r--r-- | model/user.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/model/user.go b/model/user.go index 449934386..8d8c76c68 100644 --- a/model/user.go +++ b/model/user.go @@ -228,16 +228,13 @@ func (u *User) SetDefaultNotifications() { u.NotifyProps = make(map[string]string) u.NotifyProps["email"] = "true" u.NotifyProps["push"] = USER_NOTIFY_MENTION - u.NotifyProps["desktop"] = USER_NOTIFY_ALL + u.NotifyProps["desktop"] = USER_NOTIFY_MENTION u.NotifyProps["desktop_sound"] = "true" u.NotifyProps["mention_keys"] = u.Username + ",@" + u.Username u.NotifyProps["channel"] = "true" - - if u.FirstName == "" { - u.NotifyProps["first_name"] = "false" - } else { - u.NotifyProps["first_name"] = "true" - } + u.NotifyProps["push_status"] = STATUS_AWAY + u.NotifyProps["comments"] = "never" + u.NotifyProps["first_name"] = "false" } func (user *User) UpdateMentionKeysFromUsername(oldUsername string) { |