Skip to content

Commit

Permalink
Add E2E_Enable_Encrypt_Files
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello committed Aug 28, 2024
1 parent 3ba09b4 commit 8288bed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/lib/constants/defaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export const defaultSettings = {
E2E_Enabled_Default_PrivateRooms: {
type: 'valueAsBoolean'
},
E2E_Enable_Encrypt_Files: {
type: 'valueAsBoolean'
},
Accounts_Directory_DefaultView: {
type: 'valueAsString'
},
Expand Down Expand Up @@ -249,10 +252,10 @@ export const defaultSettings = {
CDN_PREFIX: {
type: 'valueAsString'
},
Accounts_RequirePasswordConfirmation:{
Accounts_RequirePasswordConfirmation: {
type: 'valueAsBoolean'
},
Accounts_ConfirmPasswordPlaceholder:{
Accounts_ConfirmPasswordPlaceholder: {
type: 'valueAsString'
},
...deprecatedSettings
Expand Down
3 changes: 2 additions & 1 deletion app/lib/encryption/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ class Encryption {
throw new Error('Subscription not found');
}

if (!subscription.encrypted) {
const { E2E_Enable_Encrypt_Files } = store.getState().settings;
if (!subscription.encrypted || !E2E_Enable_Encrypt_Files) {
// Send a non encrypted message
return { file };
}
Expand Down

0 comments on commit 8288bed

Please sign in to comment.