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 | 15090143d051e00b95b80ee1d3fe9539ccf025de (patch) | |
tree | b21626baeb494c0415bb3a6bfd9221091c3060b1 | |
parent | Remove discord login config (diff) | |
download | server-15090143d051e00b95b80ee1d3fe9539ccf025de.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()); } |