Explorar o código

E2E module deactivated but entry digit always present #502

Marino Faggiana %!s(int64=7) %!d(string=hai) anos
pai
achega
725276bfdd
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  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;