init all guild topics on start

This commit is contained in:
Raven Scott 2024-07-07 21:40:52 -04:00
parent 55875f468c
commit ed4625275d

7
app.js
View File

@ -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');