fix: use __INITIAL_BOT_NAME__ for WS reconnection bot name
All checks were successful
BotUI CI / build (push) Successful in 4m26s
All checks were successful
BotUI CI / build (push) Successful in 4m26s
This commit is contained in:
parent
281d5aed2e
commit
d27e6d6b76
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue