diff options
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/bulk-delete.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/bulk-delete.ts b/api/src/routes/channels/#channel_id/messages/bulk-delete.ts index a0fe7cc0..7a711cb0 100644 --- a/api/src/routes/channels/#channel_id/messages/bulk-delete.ts +++ b/api/src/routes/channels/#channel_id/messages/bulk-delete.ts @@ -29,7 +29,7 @@ router.post("/", route({ body: "BulkDeleteSchema" }), async (req: Request, res: if (messages.length < 2) throw new HTTPError("You must at least specify 2 messages to bulk delete"); if (messages.length > maxBulkDelete) throw new HTTPError(`You cannot delete more than ${maxBulkDelete} messages`); - await Message.delete({ id: In(messages) }); + await Message.delete(messages.map((x) => ({ id: x }))); await emitEvent({ event: "MESSAGE_DELETE_BULK", |