diff options
author | Samuel <34555296+Flam3rboy@users.noreply.github.com> | 2023-03-18 04:13:04 +0100 |
---|---|---|
committer | Samuel <34555296+Flam3rboy@users.noreply.github.com> | 2023-03-18 04:13:04 +0100 |
commit | 7b00e9905327c826b82fc47cfa22e37b9c5161a9 (patch) | |
tree | 5a9458701dacc77bf8c6265ebf96035bf0b93e5f /src/api/util | |
parent | fix: missing id in select query (diff) | |
download | server-7b00e9905327c826b82fc47cfa22e37b9c5161a9.tar.xz |
fix: use entity.save() instead of insert (needed for caching)
Diffstat (limited to 'src/api/util')
-rw-r--r-- | src/api/util/handlers/Message.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts index e514d400..8fbbf4bf 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts @@ -274,7 +274,7 @@ export async function sendMessage(opts: MessageOptions) { const message = await handleMessage({ ...opts, timestamp: new Date() }); await Promise.all([ - Message.insert(message), + message.save(), emitEvent({ event: "MESSAGE_CREATE", channel_id: opts.channel_id, |