Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / legalpad / mail / LegalpadMailReceiver.php
blob679812e4adf8a2bded35f0cc9dafd77d13cfa5e2
1 <?php
3 final class LegalpadMailReceiver extends PhabricatorObjectMailReceiver {
5 public function isEnabled() {
6 return PhabricatorApplication::isClassInstalled(
7 'PhabricatorLegalpadApplication');
10 protected function getObjectPattern() {
11 return 'L[1-9]\d*';
14 protected function loadObject($pattern, PhabricatorUser $viewer) {
15 $id = (int)substr($pattern, 1);
17 return id(new LegalpadDocumentQuery())
18 ->setViewer($viewer)
19 ->withIDs(array($id))
20 ->needDocumentBodies(true)
21 ->executeOne();
24 protected function getTransactionReplyHandler() {
25 return new LegalpadReplyHandler();