Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/mail/FileCreateMailReceiver.php
| <?php | <?php | ||||
| final class FileCreateMailReceiver extends PhabricatorMailReceiver { | final class FileCreateMailReceiver | ||||
| extends PhabricatorApplicationMailReceiver { | |||||
| public function isEnabled() { | protected function newApplication() { | ||||
| $app_class = 'PhabricatorFilesApplication'; | return new PhabricatorFilesApplication(); | ||||
| return PhabricatorApplication::isClassInstalled($app_class); | |||||
| } | |||||
| public function canAcceptMail(PhabricatorMetaMTAReceivedMail $mail) { | |||||
| $files_app = new PhabricatorFilesApplication(); | |||||
| return $this->canAcceptApplicationMail($files_app, $mail); | |||||
| } | } | ||||
| protected function processReceivedMail( | protected function processReceivedMail( | ||||
| PhabricatorMetaMTAReceivedMail $mail, | PhabricatorMetaMTAReceivedMail $mail, | ||||
| PhabricatorUser $sender) { | PhabricatorUser $sender) { | ||||
| $attachment_phids = $mail->getAttachments(); | $attachment_phids = $mail->getAttachments(); | ||||
| if (empty($attachment_phids)) { | if (empty($attachment_phids)) { | ||||
| Show All 38 Lines | |||||