feat(ui): handle PresenceList in lobby — show online users
The lobby now populates from PresenceList signal events: - Relay broadcasts user list on register/deregister - JS receives "presence_list" signal-event - Updates lobbyUsers map (excluding self) - Renders user rows with identicon, name, fingerprint Users appear in the lobby as soon as they register their signal channel — no need to join voice first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -435,6 +435,20 @@ async function pollStatus() {
|
||||
listen("signal-event", (event: any) => {
|
||||
const data = event.payload;
|
||||
switch (data.type) {
|
||||
case "presence_list":
|
||||
// Relay sent updated user list
|
||||
lobbyUsers.clear();
|
||||
for (const u of data.users || []) {
|
||||
if (u.fingerprint === myFingerprint) continue; // don't show self
|
||||
lobbyUsers.set(u.fingerprint, {
|
||||
fingerprint: u.fingerprint,
|
||||
alias: u.alias || null,
|
||||
inVoice: false,
|
||||
speaking: false,
|
||||
});
|
||||
}
|
||||
renderLobbyUsers();
|
||||
break;
|
||||
case "ringing":
|
||||
// We placed a call, it's ringing
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user