Commit 5db484fd authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents d72142f9 8b353c8b
...@@ -27,9 +27,8 @@ If you have questions or need assistance upgrading from GitLab CE to EE, ...@@ -27,9 +27,8 @@ If you have questions or need assistance upgrading from GitLab CE to EE,
## Activate GitLab EE with an activation code ## Activate GitLab EE with an activation code
In GitLab Enterprise Edition 14.1 and later, you need an activation code to activate In GitLab Enterprise Edition 14.1 and later, you need an activation code to activate
your instance. To get an activation code, [purchase a license](https://about.gitlab.com/pricing/) your instance. To get an activation code you have to [purchase a license](https://about.gitlab.com/pricing/).
or sign up for a [free trial](https://about.gitlab.com/free-trial/). The activation The activation code is a 24-character alphanumeric string you receive in a confirmation email.
code is a 24-character alphanumeric string you receive in a confirmation email.
You can also sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in) You can also sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in)
to copy the activation code to your clipboard. to copy the activation code to your clipboard.
......
...@@ -177,7 +177,7 @@ module Gitlab ...@@ -177,7 +177,7 @@ module Gitlab
end end
def from_address def from_address
(mail.reply_to || []).first || mail.from.first || mail.sender mail.from.first || mail.sender
end end
def can_handle_legacy_format? def can_handle_legacy_format?
......
Delivered-To: incoming+email-test-project_id-issue-@appmail.adventuretime.ooo
Return-Path: <jake@adventuretime.ooo>
Received: from iceking.adventuretime.ooo ([unix socket]) by iceking (Cyrus v2.2.13-Debian-2.2.13-19+squeeze3) with LMTPA; Thu, 13 Jun 2013 17:03:50 -0400
Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) by iceking.adventuretime.ooo (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5DL3nFJ016967 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <incoming+gitlabhq/gitlabhq@appmail.adventuretime.ooo>; Thu, 13 Jun 2013 17:03:50 -0400
Received: by mail-ie0-f180.google.com with SMTP id f4so21977375iea.25 for <incoming+email-test-project_id-issue-@appmail.adventuretime.ooo>; Thu, 13 Jun 2013 14:03:48 -0700
Received: by 10.0.0.1 with HTTP; Thu, 13 Jun 2013 14:03:48 -0700
Date: Thu, 13 Jun 2013 17:03:48 -0400
From: Finn the Human <finn@adventuretime.ooo>
Reply-To: Finn the Hooman <hooman@adventuretime.ooo>
Sender: Jake the Dog <jake@adventuretime.ooo>
To: support@adventuretime.ooo
Delivered-To: support@adventuretime.ooo
Message-ID: <CADkmRc+rNGAGGbV2iE5p918UVy4UyJqVcXRO2=otppgzduJSg@mail.gmail.com>
Subject: The message subject! @all
Mime-Version: 1.0
Content-Type: text/plain;
charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Sieve: CMU Sieve 2.2
X-Received: by 10.0.0.1 with SMTP id n7mr11234144ipb.85.1371157428600; Thu,
13 Jun 2013 14:03:48 -0700 (PDT)
X-Scanned-By: MIMEDefang 2.69 on IPv6:2001:470:1d:165::1
Service desk stuff!
```
a = b
```
...@@ -478,6 +478,20 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler do ...@@ -478,6 +478,20 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler do
end end
end end
context 'when there is a reply-to address, a sender address, and a from address' do
let(:email_raw) { email_fixture('emails/service_desk_reply_to_sender_and_from.eml') }
it 'ignores the reply-to and prefers the from address' do
setup_attachment
expect { receiver.execute }.to change { Issue.count }.by(1)
new_issue = Issue.last
expect(new_issue.external_author).to eq('finn@adventuretime.ooo')
end
end
context 'when service desk is not enabled for project' do context 'when service desk is not enabled for project' do
before do before do
allow(Gitlab::ServiceDesk).to receive(:enabled?).and_return(false) allow(Gitlab::ServiceDesk).to receive(:enabled?).and_return(false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment