diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb index 50c16da4ef6337e9458190bc83c9b4789eb51957..5f85f7ad03fe33d423af33314b1f8b36ea99c341 100644 --- a/lib/gitlab/email/receiver.rb +++ b/lib/gitlab/email/receiver.rb @@ -158,9 +158,7 @@ module Gitlab end def sent_notification - return nil unless reply_key - - SentNotification.for(reply_key) + @sent_notification ||= SentNotification.for(reply_key) if reply_key end def add_attachments(reply, project)