@wvdsh/api 0.1.115 → 0.1.116
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.
|
@@ -280,9 +280,10 @@ export const GameplaySubdomain = {
|
|
|
280
280
|
}
|
|
281
281
|
return (h >>> 0).toString(16).padStart(8, '0');
|
|
282
282
|
},
|
|
283
|
-
// `{gameCloudId}-{hashPart(userId)}-{hashPart(gameBuildId)}`
|
|
283
|
+
// `{gameCloudId}-{hashPart(userId)}-{hashPart(gameBuildId)}`, with `guest` in place of the user hash for anonymous users
|
|
284
284
|
build(args) {
|
|
285
|
-
const
|
|
285
|
+
const userPart = args.isAnonymous ? 'guest' : GameplaySubdomain.hashPart(args.userId);
|
|
286
|
+
const subdomain = `${args.gameCloudId}-${userPart}-${GameplaySubdomain.hashPart(args.gameBuildId)}`;
|
|
286
287
|
if (subdomain.length > GameplaySubdomain.MAX_LENGTH) {
|
|
287
288
|
throw new Error(`Gameplay subdomain exceeds ${GameplaySubdomain.MAX_LENGTH} characters`);
|
|
288
289
|
}
|