From 99ee7e9400f06e8718612d8b52d15215dc620774 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Mon, 26 Sep 2022 22:29:30 +1000 Subject: Prettier --- src/webrtc/events/Message.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/webrtc/events/Message.ts') diff --git a/src/webrtc/events/Message.ts b/src/webrtc/events/Message.ts index 8f75a815..38676f6c 100644 --- a/src/webrtc/events/Message.ts +++ b/src/webrtc/events/Message.ts @@ -7,13 +7,14 @@ const PayloadSchema = { op: Number, $d: new Tuple(Object, Number), // or number for heartbeat sequence $s: Number, - $t: String + $t: String, }; export async function onMessage(this: WebSocket, buffer: Buffer) { try { var data: Payload = JSON.parse(buffer.toString()); - if (data.op !== VoiceOPCodes.IDENTIFY && !this.user_id) return this.close(CLOSECODES.Not_authenticated); + if (data.op !== VoiceOPCodes.IDENTIFY && !this.user_id) + return this.close(CLOSECODES.Not_authenticated); // @ts-ignore const OPCodeHandler = OPCodeHandlers[data.op]; @@ -25,7 +26,11 @@ export async function onMessage(this: WebSocket, buffer: Buffer) { return; } - if (![VoiceOPCodes.HEARTBEAT, VoiceOPCodes.SPEAKING].includes(data.op as VoiceOPCodes)) { + if ( + ![VoiceOPCodes.HEARTBEAT, VoiceOPCodes.SPEAKING].includes( + data.op as VoiceOPCodes, + ) + ) { // @ts-ignore console.log("[WebRTC] Opcode " + VoiceOPCodes[data.op]); } @@ -35,4 +40,4 @@ export async function onMessage(this: WebSocket, buffer: Buffer) { console.error("[WebRTC] error", error); // if (!this.CLOSED && this.CLOSING) return this.close(CloseCodes.Unknown_error); } -} \ No newline at end of file +} -- cgit 1.4.1