diff options
author | Chris Duarte <csduarte@users.noreply.github.com> | 2018-05-28 10:49:28 -0700 |
---|---|---|
committer | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-05-28 19:49:28 +0200 |
commit | 792dae23ca2b23650b34f15b1aa7ad63907a82c4 (patch) | |
tree | 9d042dd5bb94260309984da60bcbed029dbf6116 | |
parent | c37d153ffb276e501660133de836a61eec25e544 (diff) | |
download | chat-792dae23ca2b23650b34f15b1aa7ad63907a82c4.tar.gz chat-792dae23ca2b23650b34f15b1aa7ad63907a82c4.tar.bz2 chat-792dae23ca2b23650b34f15b1aa7ad63907a82c4.zip |
Avoid emails if user status is OOO or post is an auto response (#8842)
-rw-r--r-- | app/notification.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/notification.go b/app/notification.go index 0fbc33060..4f2bad09e 100644 --- a/app/notification.go +++ b/app/notification.go @@ -216,7 +216,9 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod } } - if userAllowsEmails && status.Status != model.STATUS_ONLINE && profileMap[id].DeleteAt == 0 { + autoResponderRelated := status.Status == model.STATUS_OUT_OF_OFFICE || post.Type == model.POST_AUTO_RESPONDER + + if userAllowsEmails && status.Status != model.STATUS_ONLINE && profileMap[id].DeleteAt == 0 && !autoResponderRelated { a.sendNotificationEmail(post, profileMap[id], channel, team, channelName, senderName, sender) } } |