From 1fad72d9ccb2a279d2ffb675b6ab9fecc9536974 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Wed, 28 Aug 2024 15:25:11 -0600 Subject: [PATCH] legacy cookie addition --- src/sdkBase.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sdkBase.ts b/src/sdkBase.ts index f3c0691..c106a10 100644 --- a/src/sdkBase.ts +++ b/src/sdkBase.ts @@ -461,6 +461,11 @@ export abstract class SdkBase { if (payload) { const result = JSON.parse(payload) as unknown; if (isValidIdentity(result) || isOptoutIdentity(result)) return result; + if (isLegacyCookie(result)) { + return enrichIdentity(result, Date.now()); + //this.setCookie(newCookie); + //return newCookie; + } } return null; }