mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-24 04:13:32 +00:00
Start of custom login and discord oauth flow
This commit is contained in:
14 files changed
+445
-1
No files matched your search
@@ -245,6 +245,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);
|
||||
//@ts-ignore some typeorm typescript issue
|
||||
const otherRecipientsUsers = await User.find({ where: recipients.map((x) => ({ id: x })) });
|
||||
|
||||
// TODO: check config for max number of recipients
|
||||
|
||||
@@ -62,6 +62,7 @@ export async function listenEvent(event: string, callback: (event: EventOpts) =>
|
||||
msg.type === "event" && msg.id === event && callback({ ...msg.event, cancel });
|
||||
};
|
||||
|
||||
//@ts-ignore apparently theres no function addListener with this signature
|
||||
process.addListener("message", listener);
|
||||
process.setMaxListeners(process.getMaxListeners() + 1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user