summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-05 23:32:31 +0100
committerTor Andersson <tor@ccxvii.net>2023-12-05 23:32:42 +0100
commitff56de55097dc364c57983ea91c5c7470baaa085 (patch)
tree9f054823cfa3589776269e9b09678277ef3eade4
parentcce92d3bc08acca3fe24ccfd5bbba58b03292f8d (diff)
downloadserver-ff56de55097dc364c57983ea91c5c7470baaa085.tar.gz
Don't show completely empty games in replacement list.
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.js b/server.js
index 84c7d70..f389fbd 100644
--- a/server.js
+++ b/server.js
@@ -1291,7 +1291,7 @@ const QUERY_LIST_PUBLIC_GAMES_OPEN = SQL(`
`)
const QUERY_LIST_PUBLIC_GAMES_REPLACEMENT = SQL(`
- select * from game_view where status=1 and not is_private and join_count < player_count
+ select * from game_view where status=1 and not is_private and join_count > 0 and join_count < player_count
and not exists ( select 1 from contacts where me = owner_id and you = ? and relation < 0 )
order by mtime desc, ctime desc
`)