summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/src/routes/channels/#channel_id/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/channels/#channel_id/index.ts b/api/src/routes/channels/#channel_id/index.ts
index 9a3cb4c2..dcbf6d4e 100644
--- a/api/src/routes/channels/#channel_id/index.ts
+++ b/api/src/routes/channels/#channel_id/index.ts
@@ -31,10 +31,10 @@ router.delete("/", route({ permission: "MANAGE_CHANNELS" }), async (req: Request
 		await Channel.removeRecipientFromChannel(channel, req.user_id)
 	} else {
 		await Promise.all([
-			Message.delete({ channel_id: channel_id }),
 			Invite.delete({ channel_id: channel_id }),
-			Recipient.delete({ channel_id: channel_id }),
 			ReadState.delete({ channel_id: channel_id }),
+			Message.delete({ channel_id: channel_id }),
+			Recipient.delete({ channel_id: channel_id }),
 			Channel.delete({ id: channel_id }),
 			emitEvent({ event: "CHANNEL_DELETE", data: channel, channel_id } as ChannelDeleteEvent)
 		]);