diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-10-31 12:16:15 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-10-31 12:16:15 +1100 |
commit | 1cacd4413a2129c054b71fed1bb989cecbd7b591 (patch) | |
tree | 1e58ec174674974ed911cc7dd149627b410be546 /src/gateway/events | |
parent | Sentry stuff? (diff) | |
download | server-1cacd4413a2129c054b71fed1bb989cecbd7b591.tar.xz |
Add `private_channels_version` to `client_state` in identity. also set sentry user in gateway
Diffstat (limited to 'src/gateway/events')
-rw-r--r-- | src/gateway/events/Message.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts index 4ed715b2..204f0025 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts @@ -53,11 +53,16 @@ export async function Message(this: WebSocket, buffer: WS.Data) { try { var ret = await OPCodeHandler.call(this, data); - transaction?.finish(); + Sentry.withScope((scope) => { + scope.setSpan(transaction); + scope.setUser({ id: this.user_id }); + transaction?.finish(); + }); return ret; } catch (error) { Sentry.withScope((scope) => { scope.setSpan(transaction); + if (this.user_id) scope.setUser({ id: this.user_id }); Sentry.captureException(error); }); transaction?.finish(); |