Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / files / mail / FileMailReceiver.php
blobf4074d9ba0db286a412497ab2d30566e4e641559
1 <?php
3 final class FileMailReceiver extends PhabricatorObjectMailReceiver {
5 public function isEnabled() {
6 return PhabricatorApplication::isClassInstalled(
7 'PhabricatorFilesApplication');
10 protected function getObjectPattern() {
11 return 'F[1-9]\d*';
14 protected function loadObject($pattern, PhabricatorUser $viewer) {
15 $id = (int)substr($pattern, 1);
17 return id(new PhabricatorFileQuery())
18 ->setViewer($viewer)
19 ->withIDs(array($id))
20 ->executeOne();
23 protected function getTransactionReplyHandler() {
24 return new FileReplyHandler();