From ce6363909015eae9ff19389f0b929ab5e56a096f Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 5 Oct 2021 19:52:42 +0200 Subject: :bug: fix user projection --- util/src/entities/Channel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/src/entities/Channel.ts') diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index 1644b265..51d8b026 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -203,7 +203,7 @@ export class Channel extends BaseClass { static async createDMChannel(recipients: string[], creator_user_id: string, name?: string) { recipients = recipients.unique().filter((x) => x !== creator_user_id); - const otherRecipientsUsers = await User.find({ where: recipients.map((x) => ({ id: x })) }); + const otherRecipientsUsers = await User.find({ where: recipients.map((x) => ({ id: x })), select: ["id"] }); // TODO: check config for max number of recipients if (otherRecipientsUsers.length !== recipients.length) { -- cgit 1.5.1