From f2a865f7a2635793aea79d77a889d36dbcc59d19 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Sat, 5 Oct 2024 14:00:23 +1300 Subject: [PATCH] fix lobby list not filtering right on manual request --- src/clj/web/lobby.clj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/clj/web/lobby.clj b/src/clj/web/lobby.clj index 28005909ec..9702420d2e 100644 --- a/src/clj/web/lobby.clj +++ b/src/clj/web/lobby.clj @@ -246,11 +246,12 @@ (summaries-for-lobbies))) (defn prepare-lobby-list - [in-order-lobbies users] - (for [user users - :let [uid (:uid user)]] - (let [filtered-lobbies (into [] (filter-lobby-list in-order-lobbies user))] - [uid [:lobby/list filtered-lobbies]]))) + [lobbies users] + (let [in-order-lobbies (sorted-lobbies lobbies)] + (for [user users + :let [uid (:uid user)]] + (let [filtered-lobbies (into [] (filter-lobby-list in-order-lobbies user))] + [uid [:lobby/list filtered-lobbies]])))) (defn lobby-update-uids [] @@ -266,9 +267,8 @@ (broadcast-lobby-list users))) ([users] (assert (or (sequential? users) (nil? users)) (str "Users must be a sequence: " (pr-str users))) - (let [lobbies (app-state/get-lobbies) - in-order (sorted-lobbies lobbies)] - (doseq [[uid ev] (prepare-lobby-list in-order users)] + (let [lobbies (app-state/get-lobbies)] + (doseq [[uid ev] (prepare-lobby-list lobbies users)] (when uid (ws/chsk-send! uid ev))))))