init all guild topics on start
This commit is contained in:
parent
55875f468c
commit
ed4625275d
7
app.js
7
app.js
@ -141,6 +141,7 @@ async function initialize() {
|
|||||||
loadConfigFromFile();
|
loadConfigFromFile();
|
||||||
renderGuildList();
|
renderGuildList();
|
||||||
await connectToAllRooms();
|
await connectToAllRooms();
|
||||||
|
await joinAllGuilds(); // Ensure the app joins all guilds on startup
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!configExists) {
|
if (!configExists) {
|
||||||
@ -189,6 +190,12 @@ async function initialize() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function joinAllGuilds() {
|
||||||
|
for (const guildTopic in config.guilds) {
|
||||||
|
await joinGuildRequest(guildTopic);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setupEventListeners() {
|
function setupEventListeners() {
|
||||||
const registerForm = document.querySelector('#register-form');
|
const registerForm = document.querySelector('#register-form');
|
||||||
const selectAvatarButton = document.querySelector('#select-avatar');
|
const selectAvatarButton = document.querySelector('#select-avatar');
|
||||||
|
Loading…
Reference in New Issue
Block a user