summary refs log tree commit diff
path: root/src/webrtc
diff options
context:
space:
mode:
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 d76b5bf0..27a8189f 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 c97a2bdc..b3161f94 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;