Marino Faggiana 8 years ago
parent
commit
0e4c8cad8d
2 changed files with 6 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 5 1
      iOSClient/Networking/OCNetworking.m

+ 1 - 0
.gitignore

@@ -16,6 +16,7 @@ README.md
 Documentation/
 Custom/
 GoogleService-Info.plist
+devicepushkey.h
 
 ########### OSX ###########
 # OS X temporary files that should never be committed

+ 5 - 1
iOSClient/Networking/OCNetworking.m

@@ -1225,7 +1225,11 @@
     [communication setCredentialsWithUser:_activeUser andPassword:_activePassword];
     [communication setUserAgent:[CCUtility getUserAgent]];
     
-    [communication subscribingNextcloudServerPush:_metadataNet.serverUrl pushTokenHash:@"" devicePublicKey:@"" onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
+    NSDictionary *parameter = _metadataNet.options;
+    NSString *pushTokenHash = [parameter objectForKey:@"pushTokenHash"];
+    NSString *devicePublicKey = [parameter objectForKey:@"devicePublicKey"];
+    
+    [communication subscribingNextcloudServerPush:_metadataNet.serverUrl pushTokenHash:pushTokenHash devicePublicKey:devicePublicKey onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
         
         [self complete];