toiljs 0.0.110 → 0.0.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/server/globals/auth.ts +3 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/server/globals/auth.ts
CHANGED
|
@@ -345,7 +345,9 @@ export namespace AuthService {
|
|
|
345
345
|
export function userId(): ToilUserId | null {
|
|
346
346
|
const bytes = getSessionBytes();
|
|
347
347
|
if (bytes == null) return null;
|
|
348
|
-
|
|
348
|
+
const r = new DataReader(bytes);
|
|
349
|
+
r.readU32(); // skip the @data message-boundary id that `encode()` writes first
|
|
350
|
+
return ToilUserId.fromBytes(r.readBytes());
|
|
349
351
|
}
|
|
350
352
|
|
|
351
353
|
/**
|