dkforest

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

commit a529908b1dafb13d69c3b616689ba0f59b5e2ebc
parent 9cd33dc6d2b78f910cd03a90e93b6e526a2a9758
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue, 30 Jan 2024 19:46:42 -0800

cleanup code

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

diff --git a/pkg/web/handlers/interceptors/slashInterceptor.go b/pkg/web/handlers/interceptors/slashInterceptor.go @@ -162,10 +162,8 @@ var adminCmdsMap = map[string]CmdHandler{ } func (i SlashInterceptor) InterceptMsg(c *command.Command) { - if !strings.HasPrefix(c.Message, "/") { - return - } - if strings.HasPrefix(c.Message, "/u/") { + if !strings.HasPrefix(c.Message, "/") || + strings.HasPrefix(c.Message, "/u/") { return } handled := handleUserCmd(c) ||