diff options
Diffstat (limited to 'gateway/src/opcodes/Identify.ts')
-rw-r--r-- | gateway/src/opcodes/Identify.ts | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts index d91cd7f2..a58583ee 100644 --- a/gateway/src/opcodes/Identify.ts +++ b/gateway/src/opcodes/Identify.ts @@ -1,5 +1,10 @@ -import { CLOSECODES, Payload, OPCODES } from "@fosscord/gateway/util/Constants"; -import WebSocket from "@fosscord/gateway/util/WebSocket"; +import { + WebSocket, + CLOSECODES, + Payload, + OPCODES, + genSessionId, +} from "@fosscord/gateway"; import { Channel, checkToken, @@ -24,7 +29,6 @@ import { Send } from "@fosscord/gateway/util/Send"; const experiments: any = []; import { check } from "./instanceOf"; import { Recipient } from "@fosscord/util"; -import { genSessionId } from "@fosscord/gateway/util/SessionUtils"; // TODO: bot sharding // TODO: check priviliged intents @@ -98,7 +102,9 @@ export async function onIdentify(this: WebSocket, data: Payload) { //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); if (x.channel.isDm()) { - x.channel.recipients = x.channel.recipients!.filter((x) => x.id !== this.user_id); + x.channel.recipients = x.channel.recipients!.filter( + (x) => x.id !== this.user_id + ); } return x.channel; }); @@ -109,7 +115,7 @@ export async function onIdentify(this: WebSocket, data: Payload) { if (!user) return this.close(CLOSECODES.Authentication_failed); for (let relation of user.relationships) { - const related_user = relation.to + const related_user = relation.to; const public_related_user = { username: related_user.username, discriminator: related_user.discriminator, |