summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-08-17 09:35:36 -0700
committerChristopher Speller <crspeller@gmail.com>2017-08-17 09:35:36 -0700
commitfd1301779fecc2910a9fdcf93af52ff33a4349ba (patch)
treeccd8b35d347b77c8c6a99db9422b3dbc0ff3bd2d /app/notification.go
parentd41f1695e99a81808f5dc1fbe7820062947b5291 (diff)
parent0033e3e37b12cb5d951d21492500d66a6abc472b (diff)
downloadchat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.tar.gz
chat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.tar.bz2
chat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.zip
Merge branch 'release-4.1'
Diffstat (limited to 'app/notification.go')
-rw-r--r--app/notification.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/notification.go b/app/notification.go
index 69bfa3b7a..21271c716 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