diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 00fbf65..4be3be7 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -141,6 +141,18 @@ 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 ba5d427..81063ec 100644 --- a/src/util/util/Token.ts +++ b/src/util/util/Token.ts @@ -42,8 +42,10 @@ decoded: { id: string; iat: number; - ver?: number; // token format version - did?: string; // device id + // token format version + ver?: number; + // device id + did?: string; }; };