summary refs log tree commit diff
path: root/gateway
diff options
context:
space:
mode:
authorAlTech98 <altech123159@gmail.com>2021-09-16 21:30:05 +0200
committerAlTech98 <altech123159@gmail.com>2021-09-16 21:30:05 +0200
commit75c43b7db36b8027a0e447b2861d9535001aded7 (patch)
tree2d2a8579be047cea538652acf1aa5bc5c9e1062c /gateway
parent:arrow_up: update package (diff)
downloadserver-75c43b7db36b8027a0e447b2861d9535001aded7.tar.xz
Gateway permission check fix
Diffstat (limited to 'gateway')
-rw-r--r--gateway/src/listener/listener.ts11
1 files changed, 8 insertions, 3 deletions
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?.();
 }