dkforest

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

commit f34c656fd5347dd284aa2a7fc5978488233748ac
parent 11ffd735b2958c0e0e5049b274634d5b3e88618e
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 28 Jun 2023 13:51:45 -0700

cleanup

Diffstat:
Mpkg/web/handlers/api/v1/chat.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/api/v1/chat.go b/pkg/web/handlers/api/v1/chat.go @@ -209,6 +209,8 @@ func ChatStreamMessagesHandler(c echo.Context) error { // We need to change the css class in order for the css to never actually complete the animation and stay "green". var indicatorSelector bool + const metaRefresh = `<meta http-equiv="refresh" content="0" />` + Loop: for { select { @@ -219,7 +221,7 @@ Loop: // Refresh the page to prevent having it growing infinitely bigger if bytesSent > 10<<20 { // 10 MB - send(`<meta http-equiv="refresh" content="0" />`) + send(metaRefresh) return nil } @@ -254,7 +256,7 @@ Loop: } if topic == selfRefreshTopic || msgTyp.Typ == database.ForceRefresh { - send(`<meta http-equiv="refresh" content="0" />`) + send(metaRefresh) return nil }