diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-05 19:52:42 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-05 19:52:42 +0200 |
commit | c3551d92543fd4ced618e2aac0be38f3ca9ee2df (patch) | |
tree | b7a8f2f948aa88d40d3b87f527b92458751398e2 /util/src | |
parent | :art: reformatted (diff) | |
download | server-c3551d92543fd4ced618e2aac0be38f3ca9ee2df.tar.xz |
:bug: fix user projection
Diffstat (limited to 'util/src')
-rw-r--r-- | util/src/entities/Channel.ts | 2 | ||||
-rw-r--r-- | util/src/entities/User.ts | 1 |
2 files changed, 2 insertions, 1 deletions
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) { diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts index a139d362..97564af3 100644 --- a/util/src/entities/User.ts +++ b/util/src/entities/User.ts @@ -29,6 +29,7 @@ export enum PrivateUserEnum { premium, premium_type, disabled, + settings, // locale } export type PrivateUserKeys = keyof typeof PrivateUserEnum | PublicUserKeys; |