summary refs log tree commit diff
path: root/gateway/src/listener/listener.ts
diff options
context:
space:
mode:
Diffstat (limited to 'gateway/src/listener/listener.ts')
-rw-r--r--gateway/src/listener/listener.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/gateway/src/listener/listener.ts b/gateway/src/listener/listener.ts
index ef3dd890..ae13cca7 100644
--- a/gateway/src/listener/listener.ts
+++ b/gateway/src/listener/listener.ts
@@ -32,7 +32,7 @@ export async function setupListener(this: WebSocket) {
 	});
 	const guilds = members.map((x) => x.guild);
 	const recipients = await Recipient.find({
-		where: { user_id: this.user_id },
+		where: { user_id: this.user_id, closed: false },
 		relations: ["channel"],
 	});
 	const dm_channels = recipients.map((x) => x.channel);
@@ -116,7 +116,7 @@ async function consume(this: WebSocket, opts: EventOpts) {
 					.has("VIEW_CHANNEL")
 			)
 				return;
-		// TODO: check if user has permission to channel
+			//No break needed here, we need to call the listenEvent function below
 		case "GUILD_CREATE":
 			this.events[id] = await listenEvent(id, consumer, listenOpts);
 			break;