Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2016-08-15 17:15:20 +0300
committerNick Thomas <nick@gitlab.com>2016-08-15 17:16:46 +0300
commit10af11f4fe71e46d4decd2ab428e9b2b38e2d463 (patch)
treecd63f8bf0d1800adb2cea87ead1f52da5bbe97df /app/services/notification_service.rb
parent6642ae4579d6ceed6b26014aee4a22adb39fc43c (diff)
Allow people to subscribe to mentions in updated MRs and Issues
This slightly changes the semantics of the 'New Issue' and 'New MR' events to include new mentions in edited Mentionables. An alternative would be to introduce 'Issue updated' and 'MR updated' events, but that would lead to questions about why those events were only available to new mentions, and not existing mentions as well, so hold off for now.
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 01f95281170..2291bc0f127 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -500,7 +500,8 @@ class NotificationService
end
def new_mentions_in_resource_email(target, project, new_mentioned_users, current_user, method)
- recipients = build_recipients(target, project, current_user) & new_mentioned_users
+ recipients = build_recipients(target, project, current_user, action: "new")
+ recipients = recipients & new_mentioned_users
recipients.each do |recipient|
mailer.send(method, recipient.id, target.id, current_user.id).deliver_later