From 792dae23ca2b23650b34f15b1aa7ad63907a82c4 Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Mon, 28 May 2018 10:49:28 -0700 Subject: Avoid emails if user status is OOO or post is an auto response (#8842) --- app/notification.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/notification.go') 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) } } -- cgit v1.2.3-1-g7c22