Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/mail/PhabricatorAuditReplyHandler.php
| <?php | <?php | ||||
| final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler { | final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler { | ||||
| public function validateMailReceiver($mail_receiver) { | public function validateMailReceiver($mail_receiver) { | ||||
| if (!($mail_receiver instanceof PhabricatorRepositoryCommit)) { | if (!($mail_receiver instanceof PhabricatorRepositoryCommit)) { | ||||
| throw new Exception("Mail receiver is not a commit!"); | throw new Exception('Mail receiver is not a commit!'); | ||||
| } | } | ||||
| } | } | ||||
| public function getPrivateReplyHandlerEmailAddress( | public function getPrivateReplyHandlerEmailAddress( | ||||
| PhabricatorObjectHandle $handle) { | PhabricatorObjectHandle $handle) { | ||||
| return $this->getDefaultPrivateReplyHandlerEmailAddress($handle, 'C'); | return $this->getDefaultPrivateReplyHandlerEmailAddress($handle, 'C'); | ||||
| } | } | ||||
| public function getPublicReplyHandlerEmailAddress() { | public function getPublicReplyHandlerEmailAddress() { | ||||
| return $this->getDefaultPublicReplyHandlerEmailAddress('C'); | return $this->getDefaultPublicReplyHandlerEmailAddress('C'); | ||||
| } | } | ||||
| public function getReplyHandlerDomain() { | public function getReplyHandlerDomain() { | ||||
| return PhabricatorEnv::getEnvConfig( | return PhabricatorEnv::getEnvConfig( | ||||
| 'metamta.diffusion.reply-handler-domain'); | 'metamta.diffusion.reply-handler-domain'); | ||||
| } | } | ||||
| public function getReplyHandlerInstructions() { | public function getReplyHandlerInstructions() { | ||||
| if ($this->supportsReplies()) { | if ($this->supportsReplies()) { | ||||
| return pht("Reply to comment."); | return pht('Reply to comment.'); | ||||
| } else { | } else { | ||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| protected function receiveEmail(PhabricatorMetaMTAReceivedMail $mail) { | protected function receiveEmail(PhabricatorMetaMTAReceivedMail $mail) { | ||||
| $commit = $this->getMailReceiver(); | $commit = $this->getMailReceiver(); | ||||
| $actor = $this->getActor(); | $actor = $this->getActor(); | ||||
| Show All 16 Lines | |||||