This commit is contained in:
Raven Scott 2024-06-22 16:52:05 -04:00
parent fd02cff23f
commit 6ea37b8082

12
app.js
View File

@ -82,6 +82,18 @@ async function joinGuild(guildTopic) {
} }
} }
async function processGuild(guildData) {
const parsedData = JSON.parse(guildData);
config.guilds[parsedData.guildTopic] = {
alias: parsedData.guildAlias,
rooms: parsedData.rooms,
owner: parsedData.owner
};
writeConfigToFile("./config.json");
renderGuildList();
await joinGuild(parsedData.guildTopic);
}
async function joinRoom(guildTopic, roomTopic, alias) { async function joinRoom(guildTopic, roomTopic, alias) {
const topicBuffer = b4a.from(roomTopic, 'hex'); const topicBuffer = b4a.from(roomTopic, 'hex');
addRoomToList(guildTopic, roomTopic, alias); addRoomToList(guildTopic, roomTopic, alias);