From 760cdeda925931d335751b1dd00c442086d4704a Mon Sep 17 00:00:00 2001 From: ImAaronFR <96433859+ImAaronFR@users.noreply.github.com> Date: Wed, 9 Feb 2022 09:52:27 +0330 Subject: [PATCH] [Fix] Client bug (#623) If you don't delete this property for some reasons after you send a message in a guild, your roles will be removed (client sided) for everyone, this fixes it. --- api/src/routes/channels/#channel_id/messages/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index 5fdab623..2fd08b04 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -219,7 +219,10 @@ router.post( }) ); } - + + //Fix for the client bug + delete message.member + await Promise.all([ message.save(), emitEvent({ event: "MESSAGE_CREATE", channel_id: channel_id, data: message } as MessageCreateEvent),