commit 2affc8be94b75793b3a2a3f841d87972a7499872
parent 30a835fe8b2663f70a6b9bafc7cdb0cd575e6dd0
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 23 May 2023 06:24:57 -0700
fix nil pointer error
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/web/handlers/chat.go b/pkg/web/handlers/chat.go
@@ -16,7 +16,7 @@ func chatHandler(c echo.Context, redRoom, stream bool) error {
authUser := c.Get("authUser").(*database.User)
db := c.Get("database").(*database.DkfDB)
- if !stream {
+ if !stream && authUser != nil {
stream = authUser.UseStream
}