From ed4625275dd0921267ca311d344ce69ce52274b4 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sun, 7 Jul 2024 21:40:52 -0400 Subject: [PATCH] init all guild topics on start --- app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app.js b/app.js index 8e93c44..a5974f5 100644 --- a/app.js +++ b/app.js @@ -141,6 +141,7 @@ async function initialize() { loadConfigFromFile(); renderGuildList(); await connectToAllRooms(); + await joinAllGuilds(); // Ensure the app joins all guilds on startup } if (!configExists) { @@ -189,6 +190,12 @@ async function initialize() { } } +async function joinAllGuilds() { + for (const guildTopic in config.guilds) { + await joinGuildRequest(guildTopic); + } +} + function setupEventListeners() { const registerForm = document.querySelector('#register-form'); const selectAvatarButton = document.querySelector('#select-avatar');