dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 8f4f6dcc80e993b3953ec650622440a7e9ce5a9d
parent b7c5459ca8574a73a9f6fcee164ff5d0ee953c87
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue, 10 Jan 2023 23:46:01 -0800

fix tuto backend check for dev mode

Diffstat:
Mpkg/web/handlers/handlers.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -2328,19 +2328,19 @@ func chatHandler(c echo.Context, redRoom bool) error { return c.Redirect(http.StatusFound, c.Request().Referer()) } else if formName == "tutorialP1" { - if authUser.ChatTutorial == 0 && time.Since(authUser.ChatTutorialTime) >= 14*time.Second { + if authUser.ChatTutorial == 0 && time.Since(authUser.ChatTutorialTime) >= time.Duration(data.TutoSecs)*time.Second { authUser.ChatTutorial = 1 authUser.DoSave() } return c.Redirect(http.StatusFound, c.Request().Referer()) } else if formName == "tutorialP2" { - if authUser.ChatTutorial == 1 && time.Since(authUser.ChatTutorialTime) >= 14*time.Second { + if authUser.ChatTutorial == 1 && time.Since(authUser.ChatTutorialTime) >= time.Duration(data.TutoSecs)*time.Second { authUser.ChatTutorial = 2 authUser.DoSave() } return c.Redirect(http.StatusFound, c.Request().Referer()) } else if formName == "tutorialP3" { - if authUser.ChatTutorial == 2 && time.Since(authUser.ChatTutorialTime) >= 14*time.Second { + if authUser.ChatTutorial == 2 && time.Since(authUser.ChatTutorialTime) >= time.Duration(data.TutoSecs)*time.Second { authUser.ChatTutorial = 3 authUser.DoSave() }