diff options
author | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-02-17 21:49:42 +0400 |
---|---|---|
committer | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-02-19 21:25:18 +0400 |
commit | 96dded3ec8401e9832b3888338f37c846bd43583 (patch) | |
tree | ae782ede2d7b2668c7cc659a1ebb03b086916502 /app/services | |
parent | 57cb1ca7917f27f2c7500858fb66d53b3ea49783 (diff) |
Send emails from the author
This changes the email "From" field from "gitlab@example.com" to either:
* "John Doe <gitlab@example.com>" if the author of the action is known,
* "GitLab <gitlab@example.com>" otherwise.
Rationale: this allow mails to appear as if they were sent by the
author. It appears in the mailbox more like a real discussion between
the sender and the receiver ("John sent: we should refactor this") and
less like a robot notifying about something.
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/notification_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index 9d7bb9639ac..5daf573630d 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -257,7 +257,7 @@ class NotificationService recipients.delete(current_user) recipients.each do |recipient| - mailer.send(method, recipient.id, target.id, target.assignee_id_was) + mailer.send(method, recipient.id, target.id, target.assignee_id_was, current_user.id) end end |