dkforest

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

commit 92b32760eb9d01bd5b942d439636ef1675318c2b
parent 464f58ed2f90662119eb99fb7d2673d593ab7c4f
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 29 May 2023 03:10:19 -0700

doc

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

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5076,6 +5076,7 @@ func ChatStreamMessagesHandler(c echo.Context) error { send(`<div id="i"></div>`) // http alive indicator; green/red dot send(fmt.Sprintf(`<div style="display:flex;flex-direction:column-reverse;" id="msgs">`)) + // Get initial messages for the user pmOnlyQuery := dutils.DoParsePmDisplayMode(c.QueryParam("pmonly")) mentionsOnlyQuery := utils.DoParseBool(c.QueryParam("mentionsOnly")) displayHellbanned := authUser.DisplayHellbanned || authUser.IsHellbanned @@ -5084,6 +5085,8 @@ func ChatStreamMessagesHandler(c echo.Context) error { if err != nil { return c.Redirect(http.StatusFound, "/") } + + // Render the messages as html data.Messages = msgs data.NbButtons = authUser.CountUIButtons() nullUsername := config.NullUsername