dkforest

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

commit 062e76d7a566527136641b795ab20a0962308c1d
parent eb1cebc48813084560a7ea32e996ea18951b5247
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 29 May 2023 03:03:23 -0700

add doc

Diffstat:
Mpkg/web/handlers/handlers.go | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5037,7 +5037,7 @@ func ChatStreamMessagesHandler(c echo.Context) error { db := c.Get("database").(*database.DkfDB) authUser := c.Get("authUser").(*database.User) csrf, _ := c.Get("csrf").(string) - + roomName := c.Param("roomName") room, roomKey, err := dutils.GetRoomAndKey(db, c, roomName) if err != nil { @@ -5110,7 +5110,10 @@ func ChatStreamMessagesHandler(c echo.Context) error { readMarkerTsRound := data.ReadMarker.ReadAt.Round(time.Second) displayReadMarker := fstMsgTsRound.Before(readMarkerTsRound) || fstMsgTsRound.Equal(readMarkerTsRound) + // Toggle between true/false every 5sec. This bool keep track of which class to send for our "online indicator" + // We need to change the css class in order for the css to never actually complete the animation and stay "green". var indicatorSelector bool + Loop: for { select {