Skip to content

Commit

Permalink
Fix group listing pagination with name filter
Browse files Browse the repository at this point in the history
  • Loading branch information
sesposito committed Jul 8, 2024
1 parent 1d388b5 commit 75aeeeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
### Fixed
- Correctly wire Go runtime shutdown function context.
- Fix friends of friends api error when user has no friends.
- Fix group listing pagination if name filter is used.

## [3.22.0] - 2024-06-09
### Added
Expand Down
2 changes: 2 additions & 0 deletions server/core_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,7 @@ WHERE name ILIKE $2`
params = append(params, cursor.Name)
query += " AND name > $3"
}
query += " ORDER BY name"
case open != nil && langTag != "" && edgeCount > -1:
// Filtering by open/closed, lang tag, and edge count
state := 0
Expand Down Expand Up @@ -1723,6 +1724,7 @@ AND lang_tag = $3`
params = append(params, cursor.GetState(), cursor.Lang, cursor.EdgeCount, cursor.ID)
query += " AND (disable_time, state, lang_tag, edge_count, id) > ('1970-01-01 00:00:00 UTC', $4, $5, $6, $7)"
}
query += " ORDER BY disable_time DESC, state DESC, edge_count DESC, lang_tag DESC, id DESC"
case open != nil && edgeCount > -1:
// Filtering by open/closed and edge count.
state := 0
Expand Down

0 comments on commit 75aeeeb

Please sign in to comment.