@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add another pattern to quoted email body stripping

Summary:
Ref T3217. @hlau has an email client which quotes text with:

________________________________________
From: ...

Add a regular expression to correctly detect this as quoted body text.

Test Plan: Add unit test; executed unit test.

Reviewers: btrahan, chad

Reviewed By: chad

CC: hlau, aran

Maniphest Tasks: T3217

Differential Revision: https://secure.phabricator.com/D5986

+17 -7
+3 -7
src/__phutil_library_map__.php
··· 1118 1118 'PhabricatorMetaMTAConfigOptions' => 'applications/config/option/PhabricatorMetaMTAConfigOptions.php', 1119 1119 'PhabricatorMetaMTAController' => 'applications/metamta/controller/PhabricatorMetaMTAController.php', 1120 1120 'PhabricatorMetaMTADAO' => 'applications/metamta/storage/PhabricatorMetaMTADAO.php', 1121 - 'PhabricatorMetaMTAEmailBodyParser' => 'applications/metamta/PhabricatorMetaMTAEmailBodyParser.php', 1122 - 'PhabricatorMetaMTAEmailBodyParserTestCase' => 'applications/metamta/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php', 1121 + 'PhabricatorMetaMTAEmailBodyParser' => 'applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php', 1122 + 'PhabricatorMetaMTAEmailBodyParserTestCase' => 'applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php', 1123 1123 'PhabricatorMetaMTAListController' => 'applications/metamta/controller/PhabricatorMetaMTAListController.php', 1124 1124 'PhabricatorMetaMTAMail' => 'applications/metamta/storage/PhabricatorMetaMTAMail.php', 1125 1125 'PhabricatorMetaMTAMailBody' => 'applications/metamta/view/PhabricatorMetaMTAMailBody.php', ··· 2293 2293 'DivinerFileAtomizer' => 'DivinerAtomizer', 2294 2294 'DivinerGenerateWorkflow' => 'DivinerWorkflow', 2295 2295 'DivinerListController' => 'PhabricatorController', 2296 - 'DivinerLiveAtom' => 2297 - array( 2298 - 0 => 'DivinerDAO', 2299 - 1 => 'PhabricatorPolicyInterface', 2300 - ), 2296 + 'DivinerLiveAtom' => 'DivinerDAO', 2301 2297 'DivinerLiveBook' => 2302 2298 array( 2303 2299 0 => 'DivinerDAO',
+6
src/applications/metamta/PhabricatorMetaMTAEmailBodyParser.php src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
··· 24 24 '', 25 25 $body); 26 26 27 + // See example in T3217. 28 + $body = preg_replace( 29 + '/^________________________________________\s+From:.*?/imsU', 30 + '', 31 + $body); 32 + 27 33 return rtrim($body); 28 34 } 29 35
+8
src/applications/metamta/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php
··· 103 103 Sent from my iPhone 104 104 EOEMAIL 105 105 , 106 + <<<EOMAIL 107 + OKAY 108 + 109 + ________________________________________ 110 + From: Abraham Lincoln <alincoln@logcab.in> 111 + Subject: Core World Tariffs 112 + EOMAIL 113 + , 106 114 ); 107 115 } 108 116