Merge remote-tracking branch 'mathium05/dmFix'

This commit is contained in:
Rory&
2025-12-20 03:31:32 +01:00
4 changed files with 4 additions and 2 deletions
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -53,7 +53,7 @@ router.post(
}),
async (req: Request, res: Response) => {
const body = req.body as DmChannelCreateSchema;
res.json(await Channel.createDMChannel(body.recipients, req.user_id, body.name));
res.json(await Channel.createDMChannel(body.recipients || (body.recipient_id ? [body.recipient_id] : []), req.user_id, body.name));
},
);
@@ -18,5 +18,7 @@
export interface DmChannelCreateSchema {
name?: string;
recipients: string[];
recipients?: string[];
recipient_id?: string;
access_tokens?: string[]; //Ignored in Spacebar for now, but makes bots happy
}