From ab57df40938f8d12b1b21d8ae52a393e8ef50158 Mon Sep 17 00:00:00 2001 From: xue Date: Wed, 26 Jun 2024 01:02:10 +0300 Subject: [PATCH] refactor: Commented code for updating room lastMessageUpdatedAt in MessageController --- src/controllers/message.controller.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/controllers/message.controller.ts b/src/controllers/message.controller.ts index dabe8a0..4205a35 100644 --- a/src/controllers/message.controller.ts +++ b/src/controllers/message.controller.ts @@ -285,15 +285,15 @@ export default class MessageController { if (message?.$id) { console.log("message updated"); // Update room lastMessageUpdatedAt - let room = await database.updateDocument( - env.APP_DATABASE, - env.ROOMS_COLLECTION, - message.roomId.$id, - { lastMessageUpdatedAt: new Date() } - ); - room?.$id - ? console.log("room lastMessageUpdatedAt updated") - : console.log("room lastMessageUpdatedAt not updated"); + // let room = await database.updateDocument( + // env.APP_DATABASE, + // env.ROOMS_COLLECTION, + // message.roomId.$id, + // { lastMessageUpdatedAt: new Date() } + // ); + // room?.$id + // ? console.log("room lastMessageUpdatedAt updated") + // : console.log("room lastMessageUpdatedAt not updated"); res.status(200).json(message); } else { console.log("message not updated");