Fix: limit 0 because of too early call of notifybot

This commit is contained in:
Grail Finder
2025-07-07 12:32:23 +03:00
parent a2c5f17e30
commit 2751b6b9dc
4 changed files with 20 additions and 4 deletions

View File

@ -345,12 +345,13 @@ func HandleGiveClue(w http.ResponseWriter, r *http.Request) {
fi.Room.OpenedThisTurn = 0
StartTurnTimer(fi.Room.ID, fi.Room.Settings.RoundTime)
log.Debug("given clue", "clue", clue, "limit", fi.Room.ThisTurnLimit)
notify(models.NotifyBacklogPrefix+fi.Room.ID, clue+num)
notifyBotIfNeeded(fi.Room)
// notify(models.NotifyBacklogPrefix+fi.Room.ID, clue+num)
notify(models.NotifyRoomUpdatePrefix+fi.Room.ID, clue+num)
if err := saveFullInfo(r.Context(), fi); err != nil {
abortWithError(w, err.Error())
return
}
notifyBotIfNeeded(fi.Room)
}
func HandleRenotifyBot(w http.ResponseWriter, r *http.Request) {