diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-10-31 15:09:52 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-10-31 15:09:52 +1100 |
commit | 5b849749d5bbe9d08b0bd6e0334fa79b3e5ab891 (patch) | |
tree | 9ac3820b5e9ccd6e9a11ab2c19b6df072019798e | |
parent | Allow running api, cdn, gateway separately (diff) | |
download | server-5b849749d5bbe9d08b0bd6e0334fa79b3e5ab891.tar.xz |
Fix message patching sending old message rather than updated one
-rw-r--r-- | src/api/routes/channels/#channel_id/messages/#message_id/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts index 47faba73..6fccac30 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts @@ -82,7 +82,7 @@ router.patch( }); await Promise.all([ - new_message!.save(), + new_message.save(), await emitEvent({ event: "MESSAGE_UPDATE", channel_id, @@ -90,9 +90,9 @@ router.patch( } as MessageUpdateEvent), ]); - postHandleMessage(message); + postHandleMessage(new_message); - return res.json(message); + return res.json(new_message); }, ); |