Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/mail/PasteCreateMailReceiver.php
<?php | <?php | ||||
final class PasteCreateMailReceiver extends PhabricatorMailReceiver { | final class PasteCreateMailReceiver | ||||
extends PhabricatorApplicationMailReceiver { | |||||
public function isEnabled() { | protected function newApplication() { | ||||
$app_class = 'PhabricatorPasteApplication'; | return new PhabricatorPasteApplication(); | ||||
return PhabricatorApplication::isClassInstalled($app_class); | |||||
} | |||||
public function canAcceptMail(PhabricatorMetaMTAReceivedMail $mail) { | |||||
$paste_app = new PhabricatorPasteApplication(); | |||||
return $this->canAcceptApplicationMail($paste_app, $mail); | |||||
} | } | ||||
protected function processReceivedMail( | protected function processReceivedMail( | ||||
PhabricatorMetaMTAReceivedMail $mail, | PhabricatorMetaMTAReceivedMail $mail, | ||||
PhabricatorUser $sender) { | PhabricatorUser $sender) { | ||||
$title = $mail->getSubject(); | $title = $mail->getSubject(); | ||||
if (!$title) { | if (!$title) { | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |