Skip to content

Commit

Permalink
Merge pull request #11495 from notbakaneko/scores-around-filter-restr…
Browse files Browse the repository at this point in the history
…icted

Filter out restricted user in multiplayer score details adjacent scores
  • Loading branch information
peppy authored Sep 14, 2024
2 parents 710ebea + 605cf80 commit 3b26bad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Models/Multiplayer/PlaylistItemUserHighScore.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public static function scoresAround(ScoreLink $scoreLink): array
'query' => static
::cursorSort($cursorHelper, $placeholder)
->whereHas('scoreLink')
->whereHas('user', fn ($userQuery) => $userQuery->default())
->where('playlist_item_id', $scoreLink->playlist_item_id)
->where('user_id', '<>', $scoreLink->user_id),
'cursorHelper' => $cursorHelper,
Expand Down
1 change: 1 addition & 0 deletions app/Models/Multiplayer/ScoreLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public function position(): ?int

$query = PlaylistItemUserHighScore
::where('playlist_item_id', $this->playlist_item_id)
->whereHas('user', fn ($userQuery) => $userQuery->default())
->cursorSort('score_asc', [
'total_score' => $score->total_score,
'score_id' => $this->getKey(),
Expand Down

0 comments on commit 3b26bad

Please sign in to comment.