diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-20 23:34:54 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-20 23:34:54 +0200 |
commit | cdbb54bb3c5915556cd69b44a9eaef49c3d19d50 (patch) | |
tree | cf4ceb6f2cb52e285c6e3c2c7c173104ebe6c0cc /gateway/src/opcodes/Identify.ts | |
parent | Merge branch 'master' into unittests (diff) | |
download | server-cdbb54bb3c5915556cd69b44a9eaef49c3d19d50.tar.xz |
:art: rewrite imports
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, |