From d70cf32c8cedd3a1f7a78ddda3f3d324afd9b431 Mon Sep 17 00:00:00 2001 From: Jim Carucci <96802642+uncleJim21@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:42:13 -0500 Subject: [PATCH] try again --- src/controllers/messages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/messages.ts b/src/controllers/messages.ts index 8f9f5eb3e..2b6840323 100644 --- a/src/controllers/messages.ts +++ b/src/controllers/messages.ts @@ -810,7 +810,7 @@ export const toggleChatReadUnread = async (req: Req, res: Res): Promise => try{ const requestBody = JSON.parse(req.rawBody); //We want to mark the chat as read - if (req.shouldMarkAsUnread === false) { + if (requestBody.shouldMarkAsUnread === false) { // Call the readMessages function with the same req and res objects const result = await readMessages(req, res); return result; // Exit the function after calling readMessages