diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 6d85b7bda6..f15475e606 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1118,8 +1118,8 @@ phutil_register_library_map(array( 'PhabricatorMetaMTAConfigOptions' => 'applications/config/option/PhabricatorMetaMTAConfigOptions.php', 'PhabricatorMetaMTAController' => 'applications/metamta/controller/PhabricatorMetaMTAController.php', 'PhabricatorMetaMTADAO' => 'applications/metamta/storage/PhabricatorMetaMTADAO.php', - 'PhabricatorMetaMTAEmailBodyParser' => 'applications/metamta/PhabricatorMetaMTAEmailBodyParser.php', - 'PhabricatorMetaMTAEmailBodyParserTestCase' => 'applications/metamta/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php', + 'PhabricatorMetaMTAEmailBodyParser' => 'applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php', + 'PhabricatorMetaMTAEmailBodyParserTestCase' => 'applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php', 'PhabricatorMetaMTAListController' => 'applications/metamta/controller/PhabricatorMetaMTAListController.php', 'PhabricatorMetaMTAMail' => 'applications/metamta/storage/PhabricatorMetaMTAMail.php', 'PhabricatorMetaMTAMailBody' => 'applications/metamta/view/PhabricatorMetaMTAMailBody.php', @@ -2293,11 +2293,7 @@ phutil_register_library_map(array( 'DivinerFileAtomizer' => 'DivinerAtomizer', 'DivinerGenerateWorkflow' => 'DivinerWorkflow', 'DivinerListController' => 'PhabricatorController', - 'DivinerLiveAtom' => - array( - 0 => 'DivinerDAO', - 1 => 'PhabricatorPolicyInterface', - ), + 'DivinerLiveAtom' => 'DivinerDAO', 'DivinerLiveBook' => array( 0 => 'DivinerDAO', diff --git a/src/applications/metamta/PhabricatorMetaMTAEmailBodyParser.php b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php similarity index 88% rename from src/applications/metamta/PhabricatorMetaMTAEmailBodyParser.php rename to src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php index fe7c04afbe..0e35fa9388 100644 --- a/src/applications/metamta/PhabricatorMetaMTAEmailBodyParser.php +++ b/src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php @@ -24,6 +24,12 @@ final class PhabricatorMetaMTAEmailBodyParser { '', $body); + // See example in T3217. + $body = preg_replace( + '/^________________________________________\s+From:.*?/imsU', + '', + $body); + return rtrim($body); } diff --git a/src/applications/metamta/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php similarity index 91% rename from src/applications/metamta/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php rename to src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php index b987c4a6db..ccdebf9d72 100644 --- a/src/applications/metamta/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php +++ b/src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php @@ -102,6 +102,14 @@ OKAY Sent from my iPhone EOEMAIL +, +<< +Subject: Core World Tariffs +EOMAIL , ); }