mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-26 05:29:06 +01:00
Summary: Fixes T7088. Mainly this updates the documentation but I also snuck in tweaking how the domain reply handler is built. This does two main things -- makes the behavior consistent as some applications who didn't override this behavior would send out emails with reply tos AND makes it easier for us to deprecate the custom domain thing on a per application basis, which is just silly. On that note, the main documentation doesn't get into how this can be overridden, though I left in that mini blurb on the config setting itself. We could deprecate this harder and LOCK things if you want as well. Test Plan: read docs, looked good. reasoned through re-factor Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7088 Differential Revision: https://secure.phabricator.com/D11725
40 lines
1 KiB
PHP
40 lines
1 KiB
PHP
<?php
|
|
|
|
final class PholioReplyHandler extends PhabricatorMailReplyHandler {
|
|
|
|
public function validateMailReceiver($mail_receiver) {
|
|
if (!($mail_receiver instanceof PholioMock)) {
|
|
throw new Exception('Mail receiver is not a PholioMock!');
|
|
}
|
|
}
|
|
|
|
public function getPrivateReplyHandlerEmailAddress(
|
|
PhabricatorObjectHandle $handle) {
|
|
return $this->getDefaultPrivateReplyHandlerEmailAddress($handle, 'M');
|
|
}
|
|
|
|
public function getPublicReplyHandlerEmailAddress() {
|
|
return $this->getDefaultPublicReplyHandlerEmailAddress('M');
|
|
}
|
|
|
|
public function getReplyHandlerDomain() {
|
|
return $this->getCustomReplyHandlerDomainIfExists(
|
|
'metamta.pholio.reply-handler-domain');
|
|
}
|
|
|
|
public function getReplyHandlerInstructions() {
|
|
if ($this->supportsReplies()) {
|
|
// TODO: Implement.
|
|
return null;
|
|
return pht('Reply to comment.');
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
protected function receiveEmail(PhabricatorMetaMTAReceivedMail $mail) {
|
|
// TODO: Implement this.
|
|
return null;
|
|
}
|
|
|
|
}
|