diff options
author | Jonathan <jonfritz@gmail.com> | 2017-08-14 21:20:03 -0400 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-08-15 09:20:03 +0800 |
commit | e1e2566c67625a15dd625c43169fd6dabff4d6a4 (patch) | |
tree | 8d85791747bf05150444246df7c4bc625168f259 | |
parent | c66bb2349e307ec747f7d6b420312d3df64e550a (diff) | |
download | chat-e1e2566c67625a15dd625c43169fd6dabff4d6a4.tar.gz chat-e1e2566c67625a15dd625c43169fd6dabff4d6a4.tar.bz2 chat-e1e2566c67625a15dd625c43169fd6dabff4d6a4.zip |
PLT-7375: Email batching not on by default for accounts that have never touched their email settings (#7206)
* PLT-7375: Send batched emails if batching is enabled and user has not explicitly set their email interval preference
* PLT-7375: Reverting 4cf316fcd
* PLT-7375: Send batched emails if batching is enabled and user has not explicitly set their email interval preference
* PLT-7375: EnableEmailBatching was accidentally flipped to true in 10dcdeca4b, causing config_test.go::TestConfigFromEnviroVars to fail
* PLT-7375: EnableEmailBatching was accidentally flipped to true in 10dcdeca4b, causing config_test.go::TestConfigFromEnviroVars to fail
* PLT-7375: Reverted accidental changes to config
* PLT-7375: Manually fixing config.
-rw-r--r-- | app/notification.go | 4 | ||||
-rw-r--r-- | config/config.json | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/notification.go b/app/notification.go index b9153037e..2b8c0c8c4 100644 --- a/app/notification.go +++ b/app/notification.go @@ -333,8 +333,8 @@ func sendNotificationEmail(post *model.Post, user *model.User, channel *model.Ch if *utils.Cfg.EmailSettings.EnableEmailBatching { var sendBatched bool if result := <-Srv.Store.Preference().Get(user.Id, model.PREFERENCE_CATEGORY_NOTIFICATIONS, model.PREFERENCE_NAME_EMAIL_INTERVAL); result.Err != nil { - // if the call fails, assume it hasn't been set and don't batch notifications for this user - sendBatched = false + // if the call fails, assume that the interval has not been explicitly set and batch the notifications + sendBatched = true } else { // if the user has chosen to receive notifications immediately, don't batch them sendBatched = result.Data.(model.Preference).Value != model.PREFERENCE_EMAIL_INTERVAL_NO_BATCHING_SECONDS diff --git a/config/config.json b/config/config.json index 23d1d2ec0..0619e3500 100644 --- a/config/config.json +++ b/config/config.json @@ -307,4 +307,4 @@ "PluginSettings": { "Plugins": {} } -} +}
\ No newline at end of file |