mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-25 22:54:51 +00:00
Merge remote-tracking branch 'mathium05/dmFix'
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user