summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorChris Chrome <christophercookman@gmail.com>2021-09-20 12:16:17 -0400
committerChris Chrome <christophercookman@gmail.com>2021-09-20 12:16:17 -0400
commita4811d86ce0ad31639f33620646c6bd9f4c6b661 (patch)
tree60c2ac53c5fe039df467d42768ee960a1f8156b1 /api
parentMerge remote-tracking branch 'origin/master' (diff)
downloadserver-a4811d86ce0ad31639f33620646c6bd9f4c6b661.tar.xz
oRdEr Of OpErAtIoNs
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)
 		]);