Skip to content

Commit

Permalink
fix the default setting and migration
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-rajpal committed Oct 16, 2024
1 parent fecfef5 commit a0d56f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .changeset/swift-penguins-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@rocket.chat/meteor': major
---

Change the E2EE settings, "Access unencrypted content in encrypted rooms" and "Encrypt files" default values, making the current behavior not allow to send unencrypted messages in end-to-end encrypted channels and enable users to send encrypted files and attachments.
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.
2 changes: 1 addition & 1 deletion apps/meteor/server/settings/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
13 changes: 1 addition & 12 deletions apps/meteor/server/startup/migrations/v314.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { addMigration } from '../../lib/migrations';

addMigration({
version: 314,
name: 'Update default behavior of E2EE settings, to not allow un-encrypted messages by default and allow files encryption by default.',
name: 'Update default behavior of E2E_Allow_Unencrypted_Messages setting, to not allow un-encrypted messages by default.',
async up() {
await Settings.updateOne(
{
Expand All @@ -17,16 +17,5 @@ addMigration({
},
},
);
await Settings.updateOne(
{
_id: 'E2E_Enable_Encrypt_Files',
},
{
$set: {
value: true,
packageValue: true,
},
},
);
},
});

0 comments on commit a0d56f4

Please sign in to comment.