@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 a fatal

Summary:
Ref T7795.

I can't get this to reproduce and its confusing to me how its possible. The trace in T7795 uses the "LOAD" pathway on the update controller. Under the hood, this issues a ThreadQuery with needTransactions to true. With needTransactions to true, the transactions and pertinent handles are all loaded nicely.

So... best guess is there has been some LIMIT of transactions since the offending person participated...? Alternative fix which would probably work is to specify needParticipantCache to true.

More on T7795 - the user report found the "a, b, c..." subtitle thing in the messages dropdown confusing. Yet another fix here would be to change that to be something like "a: snippet of what a said...". I'll discuss that on the task.

Test Plan: iiam

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: nevogd, Korvin, epriestley

Maniphest Tasks: T7795

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

+12 -5
+8 -3
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 10 10 return new Aphront404Response(); 11 11 } 12 12 13 + $need_participants = false; 13 14 $needed_capabilities = array(PhabricatorPolicyCapability::CAN_VIEW); 14 15 $action = $request->getStr('action', ConpherenceUpdateActions::METADATA); 15 16 switch ($action) { ··· 26 27 case ConpherenceUpdateActions::JOIN_ROOM: 27 28 $needed_capabilities[] = PhabricatorPolicyCapability::CAN_JOIN; 28 29 break; 30 + case ConpherenceUpdateActions::NOTIFICATIONS: 31 + $need_participants = true; 32 + break; 33 + case ConpherenceUpdateActions::LOAD: 34 + break; 29 35 } 30 36 $conpherence = id(new ConpherenceThreadQuery()) 31 37 ->setViewer($user) 32 38 ->withIDs(array($conpherence_id)) 33 39 ->needFilePHIDs(true) 34 - ->needParticipantCache(true) 40 + ->needParticipants($need_participants) 35 41 ->requireCapabilities($needed_capabilities) 36 42 ->executeOne(); 37 43 ··· 373 379 374 380 $need_widget_data = false; 375 381 $need_transactions = false; 376 - $need_participant_cache = false; 382 + $need_participant_cache = true; 377 383 switch ($action) { 378 384 case ConpherenceUpdateActions::METADATA: 379 - $need_participant_cache = true; 380 385 $need_transactions = true; 381 386 break; 382 387 case ConpherenceUpdateActions::LOAD:
+4 -2
src/applications/conpherence/query/ConpherenceThreadQuery.php
··· 97 97 $this->loadParticipantsAndInitHandles($conpherences); 98 98 if ($this->needParticipantCache) { 99 99 $this->loadCoreHandles($conpherences, 'getRecentParticipantPHIDs'); 100 - } else if ($this->needWidgetData) { 100 + } 101 + if ($this->needWidgetData) { 101 102 $this->loadCoreHandles($conpherences, 'getParticipantPHIDs'); 102 103 } 103 104 if ($this->needTransactions) { ··· 244 245 ->execute(); 245 246 foreach ($handle_phids as $conpherence_phid => $phids) { 246 247 $conpherence = $conpherences[$conpherence_phid]; 247 - $conpherence->attachHandles(array_select_keys($handles, $phids)); 248 + $conpherence->attachHandles( 249 + $conpherence->getHandles() + array_select_keys($handles, $phids)); 248 250 } 249 251 return $this; 250 252 }