From 410998718dbcce665aa266d9280e5b6cdac42b6b Mon Sep 17 00:00:00 2001 From: Ben Teichman Date: Thu, 12 Sep 2024 13:16:08 -0400 Subject: [PATCH] fix: ensure all sessionIDs are encoded (SOS-52) (#168) --- .../react-chat/src/contexts/RuntimeContext/useRuntimeAPI.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-chat/src/contexts/RuntimeContext/useRuntimeAPI.ts b/packages/react-chat/src/contexts/RuntimeContext/useRuntimeAPI.ts index 35d14fb93b..fe1c9247ca 100644 --- a/packages/react-chat/src/contexts/RuntimeContext/useRuntimeAPI.ts +++ b/packages/react-chat/src/contexts/RuntimeContext/useRuntimeAPI.ts @@ -73,7 +73,7 @@ export const useRuntimeAPI = ({ platform: { type: device }, } = Bowser.parse(window.navigator.userAgent); - await runtime.createTranscript(userID, { + await runtime.createTranscript(encodeURIComponent(userID), { ...(os && { os }), ...(browser && { browser }), ...(device && { device }),