commit c646d6670013c590874cc200f7ff920aef0c0d59
parent 84922ca09ac02aff429329f2c988282927b99285
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Wed, 24 May 2023 00:10:33 -0700
add doc
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/pkg/web/handlers/chat.go b/pkg/web/handlers/chat.go
@@ -13,7 +13,10 @@ import (
func chatHandler(c echo.Context, redRoom, stream bool) error {
const chatPasswordTmplName = "standalone.chat-password"
+
+ // WARNING: in this handler, "authUser" can be null.
authUser := c.Get("authUser").(*database.User)
+
db := c.Get("database").(*database.DkfDB)
if !stream && authUser != nil {