fix: use __INITIAL_BOT_NAME__ for WS reconnection bot name
All checks were successful
BotUI CI / build (push) Successful in 4m26s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-03-16 13:29:14 -03:00
parent 281d5aed2e
commit d27e6d6b76

View file

@ -923,6 +923,9 @@
updateConnectionStatus("connecting");
// Always get the bot name from window.__INITIAL_BOT_NAME__ to ensure it's correct on reconnection
var botNameForWs = window.__INITIAL_BOT_NAME__ || currentBotName || "default";
var url =
WS_URL +
"?session_id=" +
@ -930,7 +933,7 @@
"&user_id=" +
currentUserId +
"&bot_name=" +
currentBotName;
botNameForWs;
console.log("Connecting WebSocket to:", url);
ws = new WebSocket(url);