Skip to content

Commit

Permalink
order by viewer level
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Oct 30, 2023
1 parent 22d5834 commit a7d3853
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Db/CircleRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ public function getCircles(?IFederatedUser $initiator, CircleProbe $probe): arra
$qb->filterCircles(CoreQueryBuilder::CIRCLE, $probe);
if (!is_null($initiator)) {
$qb->limitToInitiator(CoreQueryBuilder::CIRCLE, $initiator);
$qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR) . '.level', 'desc');
}
if ($probe->hasFilterMember()) {
$qb->limitToDirectMembership(CoreQueryBuilder::CIRCLE, $probe->getFilterMember());
Expand Down

0 comments on commit a7d3853

Please sign in to comment.