Assign the positions the Ankyra page draws

0eb79c0 · Gabriel Morell · 2026-09-03 17:20

7 files +8 -0
Message
{commit_body(@commit)}

Files changed

modified apps/room_sanctum/lib/room_sanctum_web/live/cfg_ankyra/show.ex
+8 −0
@@ -13,6 +13,7 @@ defmodule RoomSanctumWeb.AnkyraLive.Show do
13 13 socket
14 14 |> assign(:consumer_count, nil)
15 15 |> assign(:connected_client_ids, [])
16 + |> assign(:positions, [])
16 17 |> assign(:broker, default_broker())}
17 18 end
18 19
@@ -26,6 +27,13 @@ defmodule RoomSanctumWeb.AnkyraLive.Show do
26 27 end
27 28
28 29 @impl true
30 + # Where the clients on this Ankyra say they are, newest first. The worker
31 + # holds these for five minutes and sends the list again as they age out, so
32 + # the page empties itself without needing a timer of its own.
33 + def handle_info({:ankyra_positions, positions}, socket) do
34 + {:noreply, assign(socket, :positions, positions)}
35 + end
36 +
29 37 def handle_info({:ankyra_status, nil}, socket) do
30 38 # The broker could not be asked. Say nothing rather than report an empty
31 39 # room -- the badge draws nil as "checking".

Parents: f1808db