summary refs log tree commit diff
path: root/gateway
diff options
context:
space:
mode:
authorAlTech98 <altech123159@gmail.com>2021-09-18 10:44:25 +0200
committerAlTech98 <altech123159@gmail.com>2021-09-18 10:44:25 +0200
commit296375c67e388e08b09a9bda16348103df48b75c (patch)
treeee9ea44b98735ad830bfa7676234a18221542c3b /gateway
parentMerge branch 'fosscord:master' into fix-dm (diff)
downloadserver-296375c67e388e08b09a9bda16348103df48b75c.tar.xz
Fix gateway not listening for new channels events
Diffstat (limited to 'gateway')
-rw-r--r--gateway/src/listener/listener.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/gateway/src/listener/listener.ts b/gateway/src/listener/listener.ts
index 16803639..35841312 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;
-			break;
+			//No break needed here, we need to call the listenEvent function below
 		case "GUILD_CREATE":
 			this.events[id] = await listenEvent(id, consumer, listenOpts);
 			break;
@@ -193,16 +193,11 @@ async function consume(this: WebSocket, opts: EventOpts) {
 			break;
 	}
 
-	let aa = {
+	Send(this, {
 		op: OPCODES.Dispatch,
 		t: event,
 		d: data,
 		s: this.sequence++,
-	}
-
-	//TODO remove before PR merge
-	console.log(aa)
-
-	Send(this, aa);
+	});
 	opts.acknowledge?.();
 }