Fix: bot recovery

This commit is contained in:
Grail Finder
2025-06-20 11:06:48 +03:00
parent 2db1c246a4
commit 1d51697c1a
4 changed files with 24 additions and 18 deletions

View File

@ -186,11 +186,11 @@ func HandleAddBot(w http.ResponseWriter, r *http.Request) {
return
}
botname := fmt.Sprintf("bot_%d", len(llmapi.SignalChanMap)+1) // what if many rooms?
bot, err := llmapi.NewBot(role, team, botname, fi.Room.ID, cfg)
_, err = llmapi.NewBot(role, team, botname, fi.Room.ID, cfg, false)
if err != nil {
abortWithError(w, err.Error())
return
}
go bot.StartBot()
// go bot.StartBot()
notify(models.NotifyRoomUpdatePrefix+fi.Room.ID, "")
}