b2c715bd by Jabis Sevón

room creation

1 parent 33970cbd
......@@ -22,11 +22,11 @@
return;
}
to = setTimeout(flush, opt.wait || 1);
var id = at['#']
ctx.on('in', {"@": id, ok:1})
//var id = at['#']
//ctx.on('in', {"@": id, ok:1})
});
ctx.on('get', function(at){
console.log("get at",at,disk);
//console.log("get at",at,disk);
this.to.next(at);
var lex = at.get, soul, data, opt, u;
//setTimeout(function(){
......@@ -47,7 +47,7 @@
var wait;
var flush = function(){
console.log("flushing",to);
//console.log("flushing",to);
if(wait){ return }
wait = true;
clearTimeout(to);
......
......@@ -47,10 +47,9 @@ server.on("upgrade", async function(request, socket, head) {
let pathname = parsed.pathname || "/gun";
if (debug) console.log("Got WS request", pathname);
let roomname = pathname.split().slice(1).join("");
console.log("roomname",roomname);
var gun = { gun: false, server: false };
if (pathname) {
let roomname = pathname.split("").slice(1).join("");
if (lru.has(pathname)) {
// Existing Node
if (debug) console.log("Recycle id", pathname);
......@@ -106,9 +105,10 @@ server.on("upgrade", async function(request, socket, head) {
});
} else {
;(async ()=>{
Object.assign(obj,{passwordProtected:false});
let roomnode = g.get("rtcmeeting").get(roomname).put(obj);
let rack = await roomnode.then();
console.log("room created",ack);
console.log("room created",rack);
})()
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!