summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/notification.go')
-rw-r--r--app/notification.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/app/notification.go b/app/notification.go
index 06c1c19bc..2d56d294a 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -66,13 +66,25 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
}
}
- if _, ok := profileMap[otherUserId]; ok {
+ otherUser, ok := profileMap[otherUserId]
+ if ok {
mentionedUserIds[otherUserId] = true
}
if post.Props["from_webhook"] == "true" {
mentionedUserIds[post.UserId] = true
}
+
+ if post.Type != model.POST_AUTO_RESPONDER {
+ a.Go(func() {
+ rootId := post.Id
+ if post.RootId != "" && post.RootId != post.Id {
+ rootId = post.RootId
+ }
+ a.SendAutoResponse(channel, otherUser, rootId)
+ })
+ }
+
} else {
keywords := a.GetMentionKeywordsInChannel(profileMap, post.Type != model.POST_HEADER_CHANGE && post.Type != model.POST_PURPOSE_CHANGE)
@@ -1021,8 +1033,8 @@ func DoesNotifyPropsAllowPushNotification(user *model.User, channelNotifyProps m
}
func DoesStatusAllowPushNotification(userNotifyProps model.StringMap, status *model.Status, channelId string) bool {
- // If User status is DND return false right away
- if status.Status == model.STATUS_DND {
+ // If User status is DND or OOO return false right away
+ if status.Status == model.STATUS_DND || status.Status == model.STATUS_OUT_OF_OFFICE {
return false
}