commit 5eb36f26ffcd467e5016d8b769c1f41a4bac02c4
parent 99cb5ac4ddebe6f15e61394eae84daeed8b731af
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 2 Mar 2023 19:58:43 -0800
add audit
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go
@@ -2267,6 +2267,7 @@ func NewThreadHandler(c echo.Context) error {
return c.Render(http.StatusOK, "new-thread", data)
}
if isForumSpam(data.Message) {
+ database.NewAudit(*authUser, fmt.Sprintf("spam forum %s (#%d)", authUser.Username, authUser.ID))
authUser.CanUseForum = false
authUser.DoSave()
return c.Redirect(http.StatusFound, "/")