summary refs log tree commit diff
diff options
context:
space:
mode:
authorImAaronFR <96433859+ImAaronFR@users.noreply.github.com>2022-02-09 09:52:27 +0330
committerGitHub <noreply@github.com>2022-02-09 09:22:27 +0300
commit385bdfdff4d1166a556e70c6fa98754dadd84d51 (patch)
treeb94806242f8e0ed8f1a22f94ec4cec072af869c3
parent[Fix] Column "groups" contains null-values (#622) (diff)
downloadserver-385bdfdff4d1166a556e70c6fa98754dadd84d51.tar.xz
[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.
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts5
1 files changed, 4 insertions, 1 deletions
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),