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',