Skip to content

Commit

Permalink
Add projection
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbsilva137 committed Sep 14, 2023
1 parent 95f0cbc commit ce51685
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Meteor.methods<ServerMethods>({

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',
Expand Down

0 comments on commit ce51685

Please sign in to comment.