Page MenuHomePhabricator

D12336.diff
No OneTemporary

D12336.diff

diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php
--- a/src/applications/conpherence/controller/ConpherenceUpdateController.php
+++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php
@@ -10,6 +10,7 @@
return new Aphront404Response();
}
+ $need_participants = false;
$needed_capabilities = array(PhabricatorPolicyCapability::CAN_VIEW);
$action = $request->getStr('action', ConpherenceUpdateActions::METADATA);
switch ($action) {
@@ -26,12 +27,17 @@
case ConpherenceUpdateActions::JOIN_ROOM:
$needed_capabilities[] = PhabricatorPolicyCapability::CAN_JOIN;
break;
+ case ConpherenceUpdateActions::NOTIFICATIONS:
+ $need_participants = true;
+ break;
+ case ConpherenceUpdateActions::LOAD:
+ break;
}
$conpherence = id(new ConpherenceThreadQuery())
->setViewer($user)
->withIDs(array($conpherence_id))
->needFilePHIDs(true)
- ->needParticipantCache(true)
+ ->needParticipants($need_participants)
->requireCapabilities($needed_capabilities)
->executeOne();
@@ -373,10 +379,9 @@
$need_widget_data = false;
$need_transactions = false;
- $need_participant_cache = false;
+ $need_participant_cache = true;
switch ($action) {
case ConpherenceUpdateActions::METADATA:
- $need_participant_cache = true;
$need_transactions = true;
break;
case ConpherenceUpdateActions::LOAD:
diff --git a/src/applications/conpherence/query/ConpherenceThreadQuery.php b/src/applications/conpherence/query/ConpherenceThreadQuery.php
--- a/src/applications/conpherence/query/ConpherenceThreadQuery.php
+++ b/src/applications/conpherence/query/ConpherenceThreadQuery.php
@@ -97,7 +97,8 @@
$this->loadParticipantsAndInitHandles($conpherences);
if ($this->needParticipantCache) {
$this->loadCoreHandles($conpherences, 'getRecentParticipantPHIDs');
- } else if ($this->needWidgetData) {
+ }
+ if ($this->needWidgetData) {
$this->loadCoreHandles($conpherences, 'getParticipantPHIDs');
}
if ($this->needTransactions) {
@@ -244,7 +245,8 @@
->execute();
foreach ($handle_phids as $conpherence_phid => $phids) {
$conpherence = $conpherences[$conpherence_phid];
- $conpherence->attachHandles(array_select_keys($handles, $phids));
+ $conpherence->attachHandles(
+ $conpherence->getHandles() + array_select_keys($handles, $phids));
}
return $this;
}

File Metadata

Mime Type
text/plain
Expires
Thu, May 9, 9:20 PM (2 w, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6277831
Default Alt Text
D12336.diff (2 KB)

Event Timeline