@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Conpherence - fix conpherence create

Summary: somewhere along the line this broke. Before this patch we fail the visibility check since its based on Conpherence Participants which don't get created and attached until applyExternalEffects. Believe it or not, this was the least gross fix I could come up with; since the permission check is done SO early most other ideas I had involved creating a dummy participant object to pass the check then handling things for real later on... Ref T3723.

Test Plan: created a conpherence with myself - great success

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, Korvin, aran

Maniphest Tasks: T3723

Differential Revision: https://secure.phabricator.com/D6762

+22 -3
+18 -3
src/applications/conpherence/editor/ConpherenceEditor.php
··· 45 45 } 46 46 47 47 if (!$errors) { 48 - $conpherence->openTransaction(); 49 - $conpherence->save(); 50 48 $xactions = array(); 51 49 $xactions[] = id(new ConpherenceTransaction()) 52 50 ->setTransactionType(ConpherenceTransactionType::TYPE_PARTICIPANTS) ··· 74 72 ->setActor($creator) 75 73 ->applyTransactions($conpherence, $xactions); 76 74 77 - $conpherence->saveTransaction(); 78 75 } 79 76 80 77 return array($errors, $conpherence); ··· 170 167 } 171 168 172 169 return $lock; 170 + } 171 + 172 + /** 173 + * We need to apply initial effects IFF the conpherence is new. We must 174 + * save the conpherence first thing to make sure we have an id and a phid. 175 + */ 176 + protected function shouldApplyInitialEffects( 177 + PhabricatorLiskDAO $object, 178 + array $xactions) { 179 + 180 + return !$object->getID(); 181 + } 182 + 183 + protected function applyInitialEffects( 184 + PhabricatorLiskDAO $object, 185 + array $xactions) { 186 + 187 + $object->save(); 173 188 } 174 189 175 190 protected function applyCustomInternalTransaction(
+4
src/applications/conpherence/storage/ConpherenceThread.php
··· 213 213 } 214 214 215 215 public function hasAutomaticCapability($capability, PhabricatorUser $user) { 216 + // this bad boy isn't even created yet so go nuts $user 217 + if (!$this->getID()) { 218 + return true; 219 + } 216 220 $participants = $this->getParticipants(); 217 221 return isset($participants[$user->getPHID()]); 218 222 }