Marino Faggiana 8 年之前
父节点
当前提交
ea794583c4
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      Libraries external/OCCommunicationLib/OCCommunicationLib/OCCommunication.m

+ 4 - 6
Libraries external/OCCommunicationLib/OCCommunicationLib/OCCommunication.m

@@ -1525,11 +1525,11 @@
         NSDictionary *jsongParsed = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
         NSDictionary *jsongParsed = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
         NSLog(@"[LOG] Subscribing at the Nextcloud server : %@",jsongParsed);
         NSLog(@"[LOG] Subscribing at the Nextcloud server : %@",jsongParsed);
         
         
+        NSString *publicKey = [jsongParsed objectForKey:@"publicKey"];
+        NSString *deviceIdentifier = [jsongParsed objectForKey:@"deviceIdentifier"];
+        NSString *signature = [jsongParsed objectForKey:@"signature"];
         
         
-        if (successRequest) {
-            //Return success
-            //successRequest(response, request.redirectedServer);
-        }
+        successRequest(response, publicKey, deviceIdentifier, signature, request.redirectedServer);
         
         
     } failure:^(NSHTTPURLResponse *response, NSData *responseData, NSError *error) {
     } failure:^(NSHTTPURLResponse *response, NSData *responseData, NSError *error) {
                 
                 
@@ -1537,8 +1537,6 @@
     }];
     }];
 }
 }
 
 
-
-
 #pragma mark - Activity
 #pragma mark - Activity
 
 
 - (void) getActivityServer:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSArray *listOfActivity, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest {
 - (void) getActivityServer:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSArray *listOfActivity, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest {