summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-25 07:05:19 +0100
committerRory& <root@rory.gay>2026-02-25 07:05:19 +0100
commite918f771fad808276e721db480c4e0102c8253bb (patch)
tree27783a3bb000061dc85dd8f8aefcb527472381e5
parentlast_pinned_timestamp int4 -> timestamp (diff)
downloadserver-ts-e918f771fad808276e721db480c4e0102c8253bb.tar.xz
Log usage of old access token versions in identify
-rw-r--r--src/gateway/opcodes/Identify.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts

index 9b9e1d14..00fbf650 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts
@@ -141,6 +141,17 @@ export async function onIdentify(this: WebSocket, data: Payload) { isNewSession: true, }; + if (tokenData.tokenVersion < CurrentTokenFormatVersion) + console.warn( + "[Identify/WARN] Access token version", + tokenData.tokenVersion, + "used by user", + tokenData.user.id, + `(${tokenData.user.tag})! - Client`, + this.capabilities.has(Capabilities.FLAGS.AUTH_TOKEN_REFRESH) ? "did" : "did not", + "opt for token refresh.", + ); + this.session = session; this.session.status = identify.presence?.status || "online"; this.session.last_seen = new Date();