Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
uncleJim21 committed Oct 10, 2023
1 parent a3d72a9 commit d70cf32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ export const toggleChatReadUnread = async (req: Req, res: Res): Promise<void> =>
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
Expand Down

0 comments on commit d70cf32

Please sign in to comment.