dkforest

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

commit 9da4b9db1e7864beb35df884b1c91554aa866013
parent 6c8595ff693017e03eec0220b702ddb0e7bd9bd1
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed,  7 Jun 2023 07:26:53 -0700

show err if not in stream

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

diff --git a/pkg/web/handlers/api/v1/slashInterceptor.go b/pkg/web/handlers/api/v1/slashInterceptor.go @@ -1768,6 +1768,10 @@ func handleRefreshCmd(c *Command) (handled bool) { func handleCodeCmd(c *Command) (handled bool) { if c.message == "/code" { c.err = ErrRedirect + if !c.authUser.UseStream { + c.err = errors.New("only work on stream version of this chat") + return true + } if !c.authUser.CanUseMultiline { c.err = errors.New("multiline is disabled for your account") return true