Преглед на файлове

E2E module deactivated but entry digit always present #502

Marino Faggiana преди 7 години
родител
ревизия
725276bfdd
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      iOSClient/Utility/CCUtility.m

+ 4 - 2
iOSClient/Utility/CCUtility.m

@@ -475,12 +475,14 @@
 
 + (BOOL)isEndToEndEnabled:(NSString *)account
 {
+    tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
+
     NSString *publicKey = [self getEndToEndPublicKey:account];
     NSString *privateKey = [self getEndToEndPrivateKey:account];
     NSString *passphrase = [self getEndToEndPassphrase:account];
-    NSString *publicKeyServer = [self getEndToEndPublicKeyServer:account];
+    NSString *publicKeyServer = [self getEndToEndPublicKeyServer:account];    
     
-    if (passphrase.length > 0 && privateKey.length > 0 && publicKey.length > 0 && publicKeyServer.length > 0) {
+    if (passphrase.length > 0 && privateKey.length > 0 && publicKey.length > 0 && publicKeyServer.length > 0 && capabilities.endToEndEncryption) {
         
         return YES;