[MM15037] Stop sending notifications to user whose Oauth bot posted (#15953)
Co-authored-by: Cam Graff <cameron@woodridgesoftware.com>
Этот коммит содержится в:
@@ -126,7 +126,14 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
if post.RootId != "" && parentPostList != nil {
|
||||
for _, threadPost := range parentPostList.Posts {
|
||||
profile := profileMap[threadPost.UserId]
|
||||
if profile != nil && (profile.NotifyProps[model.COMMENTS_NOTIFY_PROP] == model.COMMENTS_NOTIFY_ANY || (profile.NotifyProps[model.COMMENTS_NOTIFY_PROP] == model.COMMENTS_NOTIFY_ROOT && threadPost.Id == parentPostList.Order[0])) {
|
||||
if profile == nil {
|
||||
continue
|
||||
}
|
||||
// If this is the root post and it was posted by an OAuth bot, don't notify the user
|
||||
if threadPost.Id == parentPostList.Order[0] && threadPost.IsFromOAuthBot() {
|
||||
continue
|
||||
}
|
||||
if profile.NotifyProps[model.COMMENTS_NOTIFY_PROP] == model.COMMENTS_NOTIFY_ANY || (profile.NotifyProps[model.COMMENTS_NOTIFY_PROP] == model.COMMENTS_NOTIFY_ROOT && threadPost.Id == parentPostList.Order[0]) {
|
||||
mentionType := ThreadMention
|
||||
if threadPost.Id == parentPostList.Order[0] {
|
||||
mentionType = CommentMention
|
||||
|
||||
Ссылка в новой задаче
Block a user