summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-12 00:32:24 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-12 00:32:24 +1100
commitda9ce34933b52d86a2c6e1c135a404e711641f7f (patch)
tree3a5eefd51515f22d215644eb2f4a07f99427412e /src/gateway
parentfix rights lol (diff)
downloadserver-da9ce34933b52d86a2c6e1c135a404e711641f7f.tar.xz
Temp fix for DMs
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/opcodes/Identify.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 6244288d..29b17643 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -175,11 +175,12 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 	})) as any as UserGuildSettings[];
 
 	const channels = recipients.map((x) => {
-		//TODO is this needed? check if users in group dm that are not friends are sent in the READY event
-		users = users.concat(
-			x.channel.recipients?.map((x) => x.user.toPublicUser()) || [],
+		//@ts-ignore
+		x.channel.recipients = x.channel.recipients?.map((x) =>
+			x.user.toPublicUser(),
 		);
-		// users = users.concat(x.channel.recipients);
+		//TODO is this needed? check if users in group dm that are not friends are sent in the READY event
+		users = users.concat(x.channel.recipients as unknown as User[]);
 		if (x.channel.isDm()) {
 			x.channel.recipients = x.channel.recipients!.filter(
 				(x) => x.id !== this.user_id,