diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
commit | 849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50 (patch) | |
tree | 37c9af175c98116a0f48ca2d5c8b74f291b3ce85 /src/gateway/events | |
parent | Fix scripts/benchmark/connections.js (diff) | |
download | server-849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50.tar.xz |
Move schemas to /src/util/schemas
Diffstat (limited to 'src/gateway/events')
-rw-r--r-- | src/gateway/events/Message.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts index db7dbad2..4699f1af 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts @@ -36,7 +36,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) { data = bigIntJson.parse(buffer as string); } else if (typeof buffer == "string") { - data = bigIntJson.parse(buffer as string) + data = bigIntJson.parse(buffer as string); } else return; @@ -51,14 +51,14 @@ export async function Message(this: WebSocket, buffer: WS.Data) { return; } - // const transaction = Sentry.startTransaction({ - // op: OPCODES[data.op], - // name: `GATEWAY ${OPCODES[data.op]}`, - // data: { - // ...data.d, - // token: data?.d?.token ? "[Redacted]" : undefined, - // }, - // }); + const transaction = Sentry.startTransaction({ + op: OPCODES[data.op], + name: `GATEWAY ${OPCODES[data.op]}`, + data: { + ...data.d, + token: data?.d?.token ? "[Redacted]" : undefined, + }, + }); try { var ret = await OPCodeHandler.call(this, data); @@ -66,7 +66,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) { return ret; } catch (error) { Sentry.captureException(error); - // transaction.finish(); + transaction.finish(); console.error(`Error: Op ${data.op}`, error); // if (!this.CLOSED && this.CLOSING) return this.close(CLOSECODES.Unknown_error); |