diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-18 18:34:48 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-18 18:34:48 +0200 |
commit | d504cdf0eecc7b66b88731403112a69934a90499 (patch) | |
tree | a4b79de2e817c336514d3bcdfb126e5577cf3b48 /api/src/util/Message.ts | |
parent | :globe_with_meridians: remove unused locales (diff) | |
download | server-d504cdf0eecc7b66b88731403112a69934a90499.tar.xz |
:zap: message performance
Diffstat (limited to '')
-rw-r--r-- | api/src/util/Message.ts | 2 |
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) ]); |