From 11b2176773fbfed96d06d33075baf0785daaf69b Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 3 Sep 2021 04:04:34 +0200 Subject: :bug: fix message sending --- api/src/routes/channels/#channel_id/messages/#message_id/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'api/src/routes/channels') 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) ]); -- cgit 1.4.1