marinofaggiana 4 년 전
부모
커밋
c7e993f3f3
3개의 변경된 파일23개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      Cartfile
  2. 2 2
      Cartfile.resolved
  3. 20 1
      iOSClient/Networking/NCNetworkingE2EE.swift

+ 1 - 1
Cartfile

@@ -17,7 +17,7 @@ github "krzyzanowskim/OpenSSL" "1.0.218"
 github "huri000/SwiftEntryKit" "1.2.3"
 github "scenee/FloatingPanel"
 github "ivanbruel/MarkdownKit"
-github "getsentry/sentry-cocoa" "5.0.4"
+github "getsentry/sentry-cocoa"
 github "https://github.com/marinofaggiana/AFNetworking" "master"
 github "https://github.com/marinofaggiana/KTVHTTPCache" "2.0.2"
 github "https://github.com/marinofaggiana/XLForm" "master"

+ 2 - 2
Cartfile.resolved

@@ -7,7 +7,7 @@ github "SwiftyJSON/SwiftyJSON" "5.0.0"
 github "WeTransfer/WeScan" "1.2.0"
 github "WenchaoD/FSCalendar" "2.8.0"
 github "dzenbot/DZNEmptyDataSet" "v1.8.1"
-github "getsentry/sentry-cocoa" "5.0.4"
+github "getsentry/sentry-cocoa" "5.1.0"
 github "huri000/QuickLayout" "3.0.0"
 github "huri000/SwiftEntryKit" "1.2.3"
 github "ivanbruel/MarkdownKit" "1.6"
@@ -19,7 +19,7 @@ github "marinofaggiana/AFNetworking" "2967678c3e0e98c9b8d7e06222ad12d1f49c26f2"
 github "marinofaggiana/KTVHTTPCache" "2.0.2"
 github "marinofaggiana/TOPasscodeViewController" "0.0.6"
 github "marinofaggiana/XLForm" "eb9381ad8129f60402bf412250fb31b95a628a08"
-github "nextcloud/ios-communication-library" "d32fbc5f89e71ba31609beeee9f6d8f2e01d22d7"
+github "nextcloud/ios-communication-library" "060122620e3e75886ded8cb1a9911ee511c4712b"
 github "realm/realm-cocoa" "v4.4.1"
 github "rechsteiner/Parchment" "v1.7.0"
 github "scenee/FloatingPanel" "v1.7.4"

+ 20 - 1
iOSClient/Networking/NCNetworkingE2EE.swift

@@ -240,6 +240,9 @@ import NCCommunication
         self.lock(serverUrl: serverUrl, fileId: fileId) { (e2eToken, errorCode, errorDescription) in
             if errorCode == 0 && e2eToken != nil {
             
+                let appDelegate = UIApplication.shared.delegate as! AppDelegate
+                let communication = OCNetworking.sharedManager()?.sharedOCCommunication()
+                
                 NCCommunication.shared.getE2EEMetadata(fileId: fileId, e2eToken: e2eToken) { (account, existsMetadata, errorCode, errorDescription) in
                 
                     if (fileNameRename != nil && fileNameNewRename != nil) {
@@ -258,12 +261,28 @@ import NCCommunication
                     var method = ""
                     if errorCode == 0 && existsMetadata != nil {
                         method = "PUT"
+                        
+                        communication?.updateEnd(toEndMetadata: appDelegate.activeUrl+"/", fileId: fileId, encryptedMetadata: metadata, e2eToken: e2eToken, on: communication, successRequest: { (re, a, b) in
+                            
+                        }, failureRequest: { (re, e, a) in
+                            
+                        })
+                        
                     } else if  errorCode == 404 {
                         method = "POST"
+                        
+                        communication?.storeEnd(toEndMetadata: appDelegate.activeUrl+"/", fileId: fileId, e2eToken: e2eToken, encryptedMetadata: metadata, on: communication, successRequest: { (re, a, b) in
+                            
+                        }, failureRequest: { (re, er, a) in
+                            
+                        })
+                        
                     } else {
                         completion(errorCode, errorDescription)
                     }
-                                   
+                             
+                    
+                    
                     NCCommunication.shared.putE2EEMetadata(fileId: fileId, e2eToken: e2eToken!, method: method, metadata: metadata) { (account, metadata, errorCodeSendMetadata, errorDescriptionSendMetadata) in
                                                 
                         self.unlock(serverUrl: serverUrl, fileId: fileId) { (errorCode, errorDescription) in }