From d6be6def48c4912967afd4772c34a4c9650dc2df Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 4 Mar 2024 18:58:18 +0300 Subject: [PATCH] data-debug-fix-2 --- index.mjs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.mjs b/index.mjs index f2c9232..97a18ae 100644 --- a/index.mjs +++ b/index.mjs @@ -22,10 +22,8 @@ const server = Server.configure({ console.error('Request headers not found'); return null; } - - const parsedUrl = url.parse(data.socket.url, true); - const shout_id = parsedUrl.query.shout_id; - console.debug(`parsed socket url shout_id extracted: ${shout_id}`); + const shout_id = parseInt(data.documentName.replace('shout-', ''), 10) + console.debug(`shout_id extracted: ${shout_id}`); const params = { token_type: 'access_token',