Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly filter purchases in console account view. #1273

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
### Fixed
- Ensure matchmaker stats behave correctly if matchmaker becomes fully empty and idle.
- Correctly clear rank cache entries on account deletion.
- Only display owned purchases in the console account tab.

## [3.23.0] - 2024-07-27
### Added
Expand Down
7 changes: 6 additions & 1 deletion server/core_purchase.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,12 @@ LIMIT $4`
}
params = append(params, incomingCursor.PurchaseTime.AsTime(), incomingCursor.UserId, incomingCursor.TransactionId)
} else {
query += " ORDER BY purchase_time DESC, user_id DESC, transaction_id DESC LIMIT $1"
if userID == "" {
query += " ORDER BY purchase_time DESC, user_id DESC, transaction_id DESC LIMIT $1"
} else {
query += " WHERE user_id = $1 ORDER BY purchase_time DESC, user_id DESC, transaction_id DESC LIMIT $2"
params = append(params, userID)
}
}

if limit > 0 {
Expand Down
Loading