summaryrefslogtreecommitdiff
path: root/lib/gitlab/email/receiver.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-03-31 21:56:37 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-05-16 21:27:16 +0000
commit347ee6cc912d49680d2f6b90134142c656868333 (patch)
tree9f3cd7068db03c090901696bd7b2808849d020bb /lib/gitlab/email/receiver.rb
parenta61bf17fce17b06741d47206d04b1137381fc639 (diff)
downloadgitlab-ce-347ee6cc912d49680d2f6b90134142c656868333.tar.gz
Alloy empty reply for new issues, but not response
Diffstat (limited to 'lib/gitlab/email/receiver.rb')
-rw-r--r--lib/gitlab/email/receiver.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb
index 169312f0b90..3dd3bd02707 100644
--- a/lib/gitlab/email/receiver.rb
+++ b/lib/gitlab/email/receiver.rb
@@ -44,7 +44,9 @@ module Gitlab
raise NoteableNotFoundError unless sent_notification.noteable
- note = create_note(handle_reply(project))
+ reply = handle_reply(project)
+ raise EmptyEmailError if reply.blank?
+ note = create_note(reply)
unless note.persisted?
msg = "The comment could not be created for the following reasons:"
@@ -104,8 +106,6 @@ module Gitlab
def handle_reply(project)
reply = ReplyParser.new(message).execute.strip
- raise EmptyEmailError if reply.blank?
-
add_attachments(reply, project)
reply