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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 12:08:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 12:08:19 +0300
commit02ab65d49fc94be7c91e511899762236c122977d (patch)
tree4d4bf4ec54a95a0d73e039fa1410ea841156ffb2 /lib/gitlab/email/handler
parent4411353300cf8219d2b899785bc5103c549ba8cf (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/email/handler')
-rw-r--r--lib/gitlab/email/handler/reply_processing.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/email/handler/reply_processing.rb b/lib/gitlab/email/handler/reply_processing.rb
index 6b7686cd405..312a9fdfbae 100644
--- a/lib/gitlab/email/handler/reply_processing.rb
+++ b/lib/gitlab/email/handler/reply_processing.rb
@@ -41,13 +41,20 @@ module Gitlab
end
def add_attachments(reply)
- attachments = Email::AttachmentUploader.new(mail).execute(project)
+ attachments = Email::AttachmentUploader.new(mail).execute(upload_params)
reply + attachments.map do |link|
"\n\n#{link[:markdown]}"
end.join
end
+ def upload_params
+ {
+ upload_parent: project,
+ uploader_class: FileUploader
+ }
+ end
+
def validate_permission!(permission)
raise UserNotFoundError unless author
raise UserBlockedError if author.blocked?