The rollup seats the host

A room's host takes the first seat by creating it; only the others
leave join lines. Counting joins alone reported rooms full of nobody.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-03 12:03:32 -04:00
co-authored by Claude Fable 5.1
parent e1a740119c
commit ac2c3576a7
+2
View File
@@ -65,6 +65,8 @@ for f in glob.glob("/var/lib/wizwar/rooms/*.jsonl"):
ct = datetime.datetime.fromisoformat(ca.replace("Z", "+00:00")).timestamp() ct = datetime.datetime.fromisoformat(ca.replace("Z", "+00:00")).timestamp()
if not (t0 <= ct < t1): continue if not (t0 <= ct < t1): continue
new_rooms += 1 new_rooms += 1
# The host takes the first seat by creating; only others join.
if meta.get("hostId"): seats[meta["hostId"]] += 1
for line in fh: for line in fh:
try: r = json.loads(line) try: r = json.loads(line)
except ValueError: continue except ValueError: continue