Differential D21770 Diff 51906 src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | private function stripCommands(array $lines) { | ||||
return array($commands, $lines); | return array($commands, $lines); | ||||
} | } | ||||
public function stripTextBody($body) { | public function stripTextBody($body) { | ||||
return trim($this->stripSignature($this->stripQuotedText($body))); | return trim($this->stripSignature($this->stripQuotedText($body))); | ||||
} | } | ||||
private function stripQuotedText($body) { | private function stripQuotedText($body) { | ||||
$body = phutil_string_cast($body); | |||||
// Look for "On <date>, <user> wrote:". This may be split across multiple | // Look for "On <date>, <user> wrote:". This may be split across multiple | ||||
// lines. We need to be careful not to remove all of a message like this: | // lines. We need to be careful not to remove all of a message like this: | ||||
// | // | ||||
// On which day do you want to meet? | // On which day do you want to meet? | ||||
// | // | ||||
// On <date>, <user> wrote: | // On <date>, <user> wrote: | ||||
// > Let's set up a meeting. | // > Let's set up a meeting. | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |