PLT-2664 Split out push notifications from email notifications (#3049)

* Split out push and email notification logic, always send push notifications on mention

* Add user setting to control push notifications

* Minor changeto simplify code
Этот коммит содержится в:
Joram Wilander
2016-05-19 14:33:04 -04:00
родитель fd24902194
Коммит 1492d1a3cb
6 изменённых файлов: 379 добавлений и 191 удалений

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

@@ -191,6 +191,7 @@ func (u *User) PreUpdate() {
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_sound"] = "true"
u.NotifyProps["mention_keys"] = u.Username + ",@" + u.Username