From 0cc71746670583601699170564bfbae7abf9426d Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 31 Jul 2023 18:47:58 -0600 Subject: [PATCH] gql fix --- gql.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gql.go b/gql.go index 6acdd85..a824de3 100644 --- a/gql.go +++ b/gql.go @@ -912,7 +912,11 @@ func NewGQLExtContext() *GQLExtContext { } sig := StringSignal{NewDirectSignal(GQLStateSignalType), "stop_server"} - err = ctx.Context.Send(ctx.User, ctx.Server.ID, sig) + err = Allowed(ctx.Context, ctx.User, sig.Permission(), ctx.Server) + if err != nil { + return nil, err + } + err = ctx.Context.Send(ctx.Server.ID, ctx.Server.ID, sig) if err != nil { return nil, err }