From 4d55563e062a14f0cbf0ad3ad8b2a0a19f03731f Mon Sep 17 00:00:00 2001 From: Yair Dovrat Date: Tue, 28 May 2024 11:15:43 +0200 Subject: [PATCH] remove client.set of user_id --- src/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 490d20f..c30895f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,14 +3,10 @@ import UAParser from 'ua-parser-js' // Get the user ID stored in the client, if it does not exist, then do not set it. const getUserId = (event: MCEvent): string | null => { - const { client } = event - const userId = event.payload.user_id || client.get('user_id') + const userId = event.payload.user_id if (!userId) { return null } - if (event.payload.user_id) { - client.set('user_id', userId, { scope: 'infinite' }) - } return userId }