mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 17:23:18 +00:00
🐛 fix user projection
This commit is contained in:
1 parent
72299d722b
commit
c3551d9254
7 files changed
+13
-6
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -29,6 +29,7 @@ export enum PrivateUserEnum {
|
||||
premium,
|
||||
premium_type,
|
||||
disabled,
|
||||
settings,
|
||||
// locale
|
||||
}
|
||||
export type PrivateUserKeys = keyof typeof PrivateUserEnum | PublicUserKeys;
|
||||
|
||||
Reference in new issue
Block a user