diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-17 19:50:30 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-17 19:50:30 +1100 |
commit | 9adce764e828ae4276840d316eabe8b2e6996385 (patch) | |
tree | b2b2cf4f87ada47ce3930148eb92e3efc65a3a14 | |
parent | Remove discord login config (diff) | |
download | server-9adce764e828ae4276840d316eabe8b2e6996385.tar.xz |
Add comment for 123 magic number
-rw-r--r-- | src/gateway/events/Message.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts index 12b6f8b9..a88495f6 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts @@ -16,7 +16,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) { // TODO: compression var data: Payload; - if ((buffer instanceof Buffer && buffer[0] === 123) || + if ((buffer instanceof Buffer && buffer[0] === 123) || // ASCII 123 = `{`. Bad check for JSON (typeof buffer === "string")) { data = bigIntJson.parse(buffer.toString()); } |