2 files changed, 16 insertions, 2 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 00fbf650..4be3be73 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -141,6 +141,18 @@ export async function onIdentify(this: WebSocket, data: Payload) {
isNewSession: true,
};
+ if (isNewSession)
+ console.warn(
+ "[Identify/WARN] Created new session",
+ session.session_id,
+ "for user",
+ tokenData.user.id,
+ `(${tokenData.user.tag})! - Access token version`,
+ tokenData.tokenVersion,
+ "- Access token session ID:",
+ tokenData.decoded.did ?? "(undefined)",
+ );
+
if (tokenData.tokenVersion < CurrentTokenFormatVersion)
console.warn(
"[Identify/WARN] Access token version",
diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts
index ba5d427d..81063ec0 100644
--- a/src/util/util/Token.ts
+++ b/src/util/util/Token.ts
@@ -42,8 +42,10 @@ export type UserTokenData = {
decoded: {
id: string;
iat: number;
- ver?: number; // token format version
- did?: string; // device id
+ // token format version
+ ver?: number;
+ // device id
+ did?: string;
};
};
|