summary refs log tree commit diff
path: root/src/webrtc
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-17 09:58:25 +0100
committerRory& <root@rory.gay>2025-12-17 11:04:16 +0100
commit11973397c812da59c2d544047bbb2d2d9ae583a7 (patch)
tree3e2064c4f6ff306241910dbfb877c03f46f935aa /src/webrtc
parentFix extension cleanup stuff from Mathium05 (diff)
downloadserver-ts-dev/emma-wip.tar.xz
Prettier u15 dev/emma-wip
Diffstat (limited to 'src/webrtc')
-rw-r--r--src/webrtc/events/Connection.ts17
-rw-r--r--src/webrtc/util/Send.ts5
2 files changed, 6 insertions, 16 deletions
diff --git a/src/webrtc/events/Connection.ts b/src/webrtc/events/Connection.ts

index d76b5bf00..27a8189fd 100644 --- a/src/webrtc/events/Connection.ts +++ b/src/webrtc/events/Connection.ts
@@ -36,18 +36,11 @@ export async function Connection(this: WS.Server, socket: WebRtcWebSocket, reque console.log("[WebRTC] new connection", request.url); if (EnvConfig.get().logging.gatewayLogging.logHttp) { - [ - "close", - "error", - "upgrade", - "open", - "ping", - "pong", - "unexpected-response", - ...(EnvConfig.get().logging.gatewayLogging.logHttpMessages ? ["message"] : []), - ].forEach((x) => { - socket.on(x, (y) => console.log("[WebRTC]", x, y)); - }); + ["close", "error", "upgrade", "open", "ping", "pong", "unexpected-response", ...(EnvConfig.get().logging.gatewayLogging.logHttpMessages ? ["message"] : [])].forEach( + (x) => { + socket.on(x, (y) => console.log("[WebRTC]", x, y)); + }, + ); } const { searchParams } = new URL(`http://localhost${request.url}`); diff --git a/src/webrtc/util/Send.ts b/src/webrtc/util/Send.ts
index c97a2bdc5..b3161f943 100644 --- a/src/webrtc/util/Send.ts +++ b/src/webrtc/util/Send.ts
@@ -24,10 +24,7 @@ export async function Send(socket: WebRtcWebSocket, data: VoicePayload) { await fs.mkdir(path.join(dumpPath!, id), { recursive: true, }); - await fs.writeFile( - path.join(dumpPath!, id, `${Date.now()}.out.json`), - JSON.stringify(data, null, 2), - ); + await fs.writeFile(path.join(dumpPath!, id, `${Date.now()}.out.json`), JSON.stringify(data, null, 2)); } let buffer: Buffer | string;