mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-06 04:41:01 +01:00
5cd13c3c65
Summary: Moves all remaining mail handling into ReplyHandlers. Farewell, `getPhabricatorToInformation()`! You were a bad method and no one liked you. Ref T1205. Test Plan: - Used test console to send mail to Revisions, Tasks, Conpherences and Commits (these all actually work). - Used test console to send mail to Requests, Macros, Questions and Mocks (these accept the mail but don't do anything with it, but didn't do anything before either). Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T1205 Differential Revision: https://secure.phabricator.com/D5953
32 lines
761 B
PHP
32 lines
761 B
PHP
<?php
|
|
|
|
final class ReleephRequestMailReceiver extends PhabricatorObjectMailReceiver {
|
|
|
|
public function isEnabled() {
|
|
$app_class = 'PhabricatorApplicationReleeph';
|
|
return PhabricatorApplication::isClassInstalled($app_class);
|
|
}
|
|
|
|
protected function getObjectPattern() {
|
|
return 'RQ[1-9]\d*';
|
|
}
|
|
|
|
protected function loadObject($pattern, PhabricatorUser $viewer) {
|
|
$id = (int)substr($pattern, 2);
|
|
|
|
return id(new ReleephRequestQuery())
|
|
->setViewer($viewer)
|
|
->withIDs(array($id))
|
|
->executeOne();
|
|
}
|
|
|
|
protected function processReceivedObjectMail(
|
|
PhabricatorMetaMTAReceivedMail $mail,
|
|
PhabricatorLiskDAO $object,
|
|
PhabricatorUser $sender) {
|
|
|
|
// TODO: For now, we just drop this mail on the floor.
|
|
|
|
}
|
|
|
|
}
|