summary refs log tree commit diff
path: root/src/gateway/events
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-31 12:16:15 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-31 12:16:15 +1100
commit1cacd4413a2129c054b71fed1bb989cecbd7b591 (patch)
tree1e58ec174674974ed911cc7dd149627b410be546 /src/gateway/events
parentSentry stuff? (diff)
downloadserver-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.ts7
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();