fix(formModal): encode the accessToken parameter in the chatEndpoint URL to handle special characters correctly

The accessToken parameter in the chatEndpoint URL is now encoded using the encodeURIComponent function to handle special characters correctly. This ensures that the accessToken is properly passed to the chat endpoint without causing any issues.
This commit is contained in:
anovazzi1 2023-08-30 18:01:21 -03:00
commit 418bddd322

View file

@ -175,7 +175,7 @@ export default function FormModal({
return `${
isDevelopment ? "ws" : webSocketProtocol
}://${host}${chatEndpoint}?token=${accessToken}`;
}://${host}${chatEndpoint}?token=${encodeURIComponent(accessToken!)}`;
}
function handleWsMessage(data: any) {