mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
bouncer: rehandling on forwarding ws.my_events
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
5a20102226
commit
b75f22a105
@ -78,15 +78,15 @@ module.exports = (ws, req, onClose) => {
|
||||
return ws.send(JSON.stringify(["OK", data[1]?.id, false, "rate-limited: request too fast."]));
|
||||
}
|
||||
|
||||
lastEvent = Date.now();
|
||||
ws.my_events.add(data[1]);
|
||||
|
||||
if (!ws.relays.size && !sessStarted) {
|
||||
console.log(process.pid, `>>>`, `${ws.ip} executed ${data[0]} command for the first. Initializing session`);
|
||||
newsess(ws);
|
||||
sessStarted = true;
|
||||
}
|
||||
|
||||
lastEvent = Date.now();
|
||||
|
||||
ws.my_events.add(data[1]);
|
||||
bc(data, ws);
|
||||
ws.send(JSON.stringify(["OK", data[1]?.id, true, ""]));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user