diff --git a/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php b/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php index fd602058a3..0d177e502c 100644 --- a/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php +++ b/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php @@ -36,8 +36,7 @@ final class ConpherenceQueryThreadConduitAPIMethod $offset = $request->getValue('offset'); $query = id(new ConpherenceThreadQuery()) - ->setViewer($user) - ->needParticipantCache(true); + ->setViewer($user); if ($ids) { $conpherences = $query @@ -57,7 +56,7 @@ final class ConpherenceQueryThreadConduitAPIMethod ->setLimit($limit) ->setOffset($offset) ->execute(); - $conpherence_phids = array_keys($participation); + $conpherence_phids = mpull($participation, 'getConpherencePHID'); $query->withPHIDs($conpherence_phids); $conpherences = $query->execute(); $conpherences = array_select_keys($conpherences, $conpherence_phids); diff --git a/src/applications/conpherence/controller/ConpherenceListController.php b/src/applications/conpherence/controller/ConpherenceListController.php index 6f50d2b37a..fc73d98341 100644 --- a/src/applications/conpherence/controller/ConpherenceListController.php +++ b/src/applications/conpherence/controller/ConpherenceListController.php @@ -151,6 +151,7 @@ final class ConpherenceListController extends ConpherenceController { ->withParticipantPHIDs(array($viewer->getPHID())) ->setLimit($limit) ->execute(); + $all_participation = mpull($all_participation, null, 'getConpherencePHID'); return array( 'all_participation' => $all_participation, diff --git a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php index 3dda87b1b4..8458a9d5c4 100644 --- a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php +++ b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php @@ -12,6 +12,7 @@ final class ConpherenceNotificationPanelController ->withParticipantPHIDs(array($user->getPHID())) ->setLimit(5) ->execute(); + $participant_data = mpull($participant_data, null, 'getConpherencePHID'); if ($participant_data) { $conpherences = id(new ConpherenceThreadQuery()) diff --git a/src/applications/conpherence/query/ConpherenceParticipantQuery.php b/src/applications/conpherence/query/ConpherenceParticipantQuery.php index e538ded2c2..fb4c3eff0f 100644 --- a/src/applications/conpherence/query/ConpherenceParticipantQuery.php +++ b/src/applications/conpherence/query/ConpherenceParticipantQuery.php @@ -25,22 +25,7 @@ final class ConpherenceParticipantQuery extends PhabricatorOffsetPagedQuery { $this->buildOrderClause($conn), $this->buildLimitClause($conn)); - $participants = $table->loadAllFromArray($data); - - // TODO: Fix this, it's bogus. - if ('garbage') { - if (count($this->participantPHIDs) !== 1) { - throw new Exception( - pht( - 'This query only works when querying for exactly one participant '. - 'PHID!')); - } - // This will throw results away if we aren't doing a query for exactly - // one participant PHID. - $participants = mpull($participants, null, 'getConpherencePHID'); - } - - return $participants; + return $table->loadAllFromArray($data); } protected function buildWhereClause(AphrontDatabaseConnection $conn) {