From: Toshi MARUYAMA Date: Thu, 5 Nov 2020 13:42:47 +0000 (+0000) Subject: add empty line after guard clause to app/models/mail_handler.rb X-Git-Tag: 4.2.0~551 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=40be0ae5e0d8b9716e82dc9064cc63d3ef3c3cba;p=redmine.git add empty line after guard clause to app/models/mail_handler.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20266 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 229cfb832..db9358eef 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -297,6 +297,7 @@ class MailHandler < ActionMailer::Base email.attachments.each do |attachment| next unless accept_attachment?(attachment) next unless attachment.body.decoded.size > 0 + obj.attachments << Attachment.create(:container => obj, :file => attachment.body.decoded, :filename => attachment.filename, @@ -386,11 +387,13 @@ class MailHandler < ActionMailer::Base def get_project_from_receiver_addresses local, domain = handler_options[:project_from_subaddress].to_s.split("@") return nil unless local && domain + local = Regexp.escape(local) [:to, :cc, :bcc].each do |field| header = @email[field] next if header.blank? || header.field.blank? || !header.field.respond_to?(:addrs) + header.field.addrs.each do |addr| if addr.domain.to_s.casecmp(domain)==0 && addr.local.to_s =~ /\A#{local}\+([^+]+)\z/ if project = Project.find_by_identifier($1) @@ -416,6 +419,7 @@ class MailHandler < ActionMailer::Base end end raise MissingInformation, 'Unable to determine target project' if target.nil? + target end