diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-03 04:04:34 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-03 04:04:34 +0200 |
commit | 11b2176773fbfed96d06d33075baf0785daaf69b (patch) | |
tree | e5de3fe2be7d0cd1cf4c22e8d062fb32f7c30830 /api/src/routes/channels | |
parent | :bug: fix #289 (diff) | |
download | server-11b2176773fbfed96d06d33075baf0785daaf69b.tar.xz |
:bug: fix message sending
Diffstat (limited to 'api/src/routes/channels')
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/#message_id/index.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts index 9c631a18..7a00de43 100644 --- a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts @@ -20,7 +20,8 @@ router.patch("/", check(MessageCreateSchema), async (req: Request, res: Response } const new_message = await handleMessage({ - // TODO: should be message_reference overridable? + ...message, + // TODO: should message_reference be overridable? // @ts-ignore message_reference: message.message_reference, ...body, @@ -35,7 +36,7 @@ router.patch("/", check(MessageCreateSchema), async (req: Request, res: Response await emitEvent({ event: "MESSAGE_UPDATE", channel_id, - data: { ...message, nonce: undefined } + data: { ...new_message, nonce: undefined } } as MessageUpdateEvent) ]); |