summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-04-07 05:46:26 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-05-16 21:27:16 +0000
commit3f4a6412dcc35c182d993cd1350459e8a4a1b8d1 (patch)
treeb4724455f62fdc578c4c5c62a2a7411ad28e1545
parent8156475ea501221c3ba1bf3280e8368b354839bc (diff)
downloadgitlab-ce-3f4a6412dcc35c182d993cd1350459e8a4a1b8d1.tar.gz
We should totally cache it
-rw-r--r--lib/gitlab/email/receiver.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb
index 50c16da4ef6..5f85f7ad03f 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)