chore!: Update default E2EE settings behavior (#33361)

pull/33628/head
Yash Rajpal 1 year ago committed by Guilherme Gazzo
parent d929af7b6d
commit f3147671d7
  1. 5
      .changeset/swift-penguins-help.md
  2. 2
      apps/meteor/server/settings/e2e.ts
  3. 1
      apps/meteor/server/startup/migrations/index.ts
  4. 21
      apps/meteor/server/startup/migrations/v314.ts

@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': major
---
Change the E2EE setting - "Access unencrypted content in encrypted rooms" default value, making the current behavior not allow to send unencrypted messages in end-to-end encrypted channels.

@ -10,7 +10,7 @@ export const createE2ESettings = () =>
alert: 'E2E_Enable_alert',
});
await this.add('E2E_Allow_Unencrypted_Messages', true, {
await this.add('E2E_Allow_Unencrypted_Messages', false, {
type: 'boolean',
public: true,
enableQuery: { _id: 'E2E_Enable', value: true },

@ -46,5 +46,6 @@ import './v310';
import './v311';
import './v312';
import './v313';
import './v314';
export * from './xrun';

@ -0,0 +1,21 @@
import { Settings } from '@rocket.chat/models';
import { addMigration } from '../../lib/migrations';
addMigration({
version: 314,
name: 'Update default behavior of E2E_Allow_Unencrypted_Messages setting, to not allow un-encrypted messages by default.',
async up() {
await Settings.updateOne(
{
_id: 'E2E_Allow_Unencrypted_Messages',
},
{
$set: {
value: false,
packageValue: false,
},
},
);
},
});
Loading…
Cancel
Save