From d3d733a975e520a2f069ecdec1696a4f3043a517 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Wed, 7 Apr 2021 20:26:09 +0200 Subject: :zap: use mongoose autopopulate --- src/opcodes/Identify.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/opcodes/Identify.ts b/src/opcodes/Identify.ts index 76e3b6aa..1fa75ec1 100644 --- a/src/opcodes/Identify.ts +++ b/src/opcodes/Identify.ts @@ -10,12 +10,12 @@ import { ReadyEventData, UserModel, toObject, + EVENTEnum, } from "fosscord-server-util"; import { setupListener } from "../listener/listener"; import { instanceOf } from "lambert-server"; import { IdentifySchema } from "../schema/Identify"; import { Send } from "../util/Send"; -import { EVENTEnum } from "fosscord-server-util"; import experiments from "./experiments.json"; import { check } from "./instanceOf"; @@ -62,9 +62,6 @@ export async function onIdentify(this: WebSocket, data: Payload) { }; const guilds = await GuildModel.find({ id: { $in: user.guilds } }) - .populate("channels") - .populate("roles") - .populate("emojis") .populate({ path: "joined_at", match: { id: this.user_id } }) .exec(); -- cgit 1.5.1