From ce51685d7d5669b937ee242a783beea87540ab8e Mon Sep 17 00:00:00 2001 From: matheusbsilva137 Date: Thu, 14 Sep 2023 13:13:33 -0300 Subject: [PATCH] Add projection --- apps/meteor/app/autotranslate/server/methods/saveSettings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/app/autotranslate/server/methods/saveSettings.ts b/apps/meteor/app/autotranslate/server/methods/saveSettings.ts index ba9d08a7bb02..e396d78887a9 100644 --- a/apps/meteor/app/autotranslate/server/methods/saveSettings.ts +++ b/apps/meteor/app/autotranslate/server/methods/saveSettings.ts @@ -46,7 +46,7 @@ Meteor.methods({ switch (field) { case 'autoTranslate': - const room = await Rooms.findE2ERoomById(rid); + const room = await Rooms.findE2ERoomById(rid, { projection: { _id: 1 } }); if (room && value === '1') { throw new Meteor.Error('error-e2e-enabled', 'Enabling auto-translation in E2E encrypted rooms is not allowed', { method: 'saveAutoTranslateSettings',