R-1199: a box whose household never saved its notification choice pushes the default list its page shows at start, so the hub mails by it; unreleased
gates / gates (push) Successful in 1m37s
gates / gates (push) Successful in 1m37s
This commit is contained in:
@@ -676,6 +676,15 @@ func (p *NotificationPrefs) SyncOnStartup() bool {
|
||||
return p != nil && (p.Email != "" || p.EmailCleared)
|
||||
}
|
||||
|
||||
// NotificationPrefsSaved reports whether the household ever saved its notification choice on this box. A box that never
|
||||
// did shows DefaultEnabledEvents ticked on its page (GetNotificationPrefs) — R-1199: the hub must then mail by that
|
||||
// same list, so the start-up sync pushes it (main.go, prefsSyncAtStartup).
|
||||
func (s *Settings) NotificationPrefsSaved() bool {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
return s.Notifications != nil
|
||||
}
|
||||
|
||||
// DefaultEnabledEvents are the events enabled by default for new customers.
|
||||
var DefaultEnabledEvents = []string{
|
||||
"backup_failed",
|
||||
|
||||
Reference in New Issue
Block a user