Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / badges / mail / PhabricatorBadgesMailReceiver.php
blob4e72c8422de0624baef741a37283dc0c96d2173b
1 <?php
3 final class PhabricatorBadgesMailReceiver
4 extends PhabricatorObjectMailReceiver {
6 public function isEnabled() {
7 return PhabricatorApplication::isClassInstalled(
8 'PhabricatorBadgesApplication');
11 protected function getObjectPattern() {
12 return 'BDGE[1-9]\d*';
15 protected function loadObject($pattern, PhabricatorUser $viewer) {
16 $id = (int)substr($pattern, 4);
18 return id(new PhabricatorBadgesQuery())
19 ->setViewer($viewer)
20 ->withIDs(array($id))
21 ->executeOne();
24 protected function getTransactionReplyHandler() {
25 return new PhabricatorBadgesReplyHandler();