summary refs log tree commit diff
path: root/api/src/util/Message.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-18 18:34:48 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-18 18:34:48 +0200
commitd504cdf0eecc7b66b88731403112a69934a90499 (patch)
treea4b79de2e817c336514d3bcdfb126e5577cf3b48 /api/src/util/Message.ts
parent:globe_with_meridians: remove unused locales (diff)
downloadserver-d504cdf0eecc7b66b88731403112a69934a90499.tar.xz
:zap: message performance
Diffstat (limited to '')
-rw-r--r--api/src/util/Message.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/util/Message.ts b/api/src/util/Message.ts
index d14d3aa2..789178b6 100644
--- a/api/src/util/Message.ts
+++ b/api/src/util/Message.ts
@@ -184,7 +184,7 @@ export async function sendMessage(opts: MessageOptions) {
 	const message = await handleMessage({ ...opts, timestamp: new Date() });
 
 	await Promise.all([
-		message.save(),
+		Message.insert(message),
 		emitEvent({ event: "MESSAGE_CREATE", channel_id: opts.channel_id, data: message.toJSON() } as MessageCreateEvent)
 	]);