Update ChannelService.ts
This commit is contained in:
parent
d630f09f80
commit
5fa02e6b10
@ -13,6 +13,7 @@ export class ChannelService {
|
|||||||
recipients = recipients.unique().filter((x) => x !== creator_user_id);
|
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 })) });
|
||||||
|
|
||||||
|
// TODO: check config for max number of recipients
|
||||||
if (otherRecipientsUsers.length !== recipients.length) {
|
if (otherRecipientsUsers.length !== recipients.length) {
|
||||||
throw new HTTPError("Recipient/s not found");
|
throw new HTTPError("Recipient/s not found");
|
||||||
}
|
}
|
||||||
@ -85,4 +86,4 @@ export class ChannelService {
|
|||||||
}, channel_id: channel.id
|
}, channel_id: channel.id
|
||||||
} as ChannelRecipientRemoveEvent);
|
} as ChannelRecipientRemoveEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user