Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / repository / xaction / PhabricatorRepositoryNotifyTransaction.php
blob96868cc407f09aaafa1bb02e706b6cb359e4fb0a
1 <?php
3 final class PhabricatorRepositoryNotifyTransaction
4 extends PhabricatorRepositoryTransactionType {
6 const TRANSACTIONTYPE = 'repo:notify';
8 public function generateOldValue($object) {
9 return (int)!$object->getDetail('herald-disabled');
12 public function generateNewValue($object, $value) {
13 return (int)$value;
16 public function applyInternalEffects($object, $value) {
17 $object->setDetail('herald-disabled', (int)!$value);
20 public function getTitle() {
21 $new = $this->getNewValue();
23 if ($new) {
24 return pht(
25 '%s enabled publishing for this repository.',
26 $this->renderAuthor());
27 } else {
28 return pht(
29 '%s disabled publishing for this repository.',
30 $this->renderAuthor());