From 92cbfa75955fe309ddbb89092a534a858e5e7450 Mon Sep 17 00:00:00 2001 From: AlTech98 Date: Thu, 16 Sep 2021 21:30:05 +0200 Subject: Gateway permission check fix --- gateway/src/listener/listener.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gateway') diff --git a/gateway/src/listener/listener.ts b/gateway/src/listener/listener.ts index ef3dd890..16803639 100644 --- a/gateway/src/listener/listener.ts +++ b/gateway/src/listener/listener.ts @@ -116,7 +116,7 @@ async function consume(this: WebSocket, opts: EventOpts) { .has("VIEW_CHANNEL") ) return; - // TODO: check if user has permission to channel + break; case "GUILD_CREATE": this.events[id] = await listenEvent(id, consumer, listenOpts); break; @@ -193,11 +193,16 @@ async function consume(this: WebSocket, opts: EventOpts) { break; } - Send(this, { + let aa = { op: OPCODES.Dispatch, t: event, d: data, s: this.sequence++, - }); + } + + //TODO remove before PR merge + console.log(aa) + + Send(this, aa); opts.acknowledge?.(); } -- cgit 1.4.1