diff --git a/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php b/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php index b2a7f5ae04..4679acd59f 100644 --- a/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php +++ b/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php @@ -94,6 +94,12 @@ abstract class DifferentialReviewRequestMail extends DifferentialMail { $attachments = array(); if (PhabricatorEnv::getEnvConfig('metamta.differential.attach-patches')) { + + $revision_id = $this->getRevision()->getID(); + + $diffs = $revision->loadDiffs(); + $diff_number = count($diffs); + $attachments[] = new PhabricatorMetaMTAAttachment( $this->buildPatch(), "D{$revision_id}.{$diff_number}.patch",