Skip to content
Snippets Groups Projects
Commit 8c2507a6 authored by Jonas Zohren's avatar Jonas Zohren :speech_balloon:
Browse files

Add autoAttach code on startup

parent 4f973801
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,22 @@ app.post(
}
);
try {
const autoAttachRoomsPath = path.join(__dirname, "autoAttach.json");
const urlList = JSON.parse(fs.readFileSync(autoAttachRoomsPath));
const attach = async function (roomUrl) {
try {
const room = await attachToRoom(roomUrl);
attachedRooms[room.uid] = room;
} catch (error) {}
};
for (const url of urlList) {
attach(url);
}
} catch (error) {
console.error("Could not read autoAttachroomList:", error);
}
try {
console.debug("[Debug] Running in", process.cwd());
console.debug("[Debug] Running as", __filename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment