|
|
@ -7,9 +7,6 @@ import Foundation
|
|
|
|
@objc(OWSLegacyContactDiscoveryOperation)
|
|
|
|
@objc(OWSLegacyContactDiscoveryOperation)
|
|
|
|
class LegacyContactDiscoveryBatchOperation: OWSOperation {
|
|
|
|
class LegacyContactDiscoveryBatchOperation: OWSOperation {
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Remove this feature flag.
|
|
|
|
|
|
|
|
private let isCDSEnabled = true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@objc
|
|
|
|
@objc
|
|
|
|
var registeredRecipientIds: Set<String>
|
|
|
|
var registeredRecipientIds: Set<String>
|
|
|
|
|
|
|
|
|
|
|
@ -86,9 +83,6 @@ class LegacyContactDiscoveryBatchOperation: OWSOperation {
|
|
|
|
|
|
|
|
|
|
|
|
// Called at most one time.
|
|
|
|
// Called at most one time.
|
|
|
|
override func didSucceed() {
|
|
|
|
override func didSucceed() {
|
|
|
|
guard isCDSEnabled else {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Compare against new CDS service
|
|
|
|
// Compare against new CDS service
|
|
|
|
let modernCDSOperation = CDSOperation(recipientIdsToLookup: self.recipientIdsToLookup)
|
|
|
|
let modernCDSOperation = CDSOperation(recipientIdsToLookup: self.recipientIdsToLookup)
|
|
|
|
let cdsFeedbackOperation = CDSFeedbackOperation(legacyRegisteredRecipientIds: self.registeredRecipientIds)
|
|
|
|
let cdsFeedbackOperation = CDSFeedbackOperation(legacyRegisteredRecipientIds: self.registeredRecipientIds)
|
|
|
@ -271,8 +265,8 @@ class CDSBatchOperation: OWSOperation {
|
|
|
|
cryptIv: encryptionResult.initializationVector,
|
|
|
|
cryptIv: encryptionResult.initializationVector,
|
|
|
|
cryptMac: encryptionResult.authTag,
|
|
|
|
cryptMac: encryptionResult.authTag,
|
|
|
|
enclaveId: remoteAttestation.enclaveId,
|
|
|
|
enclaveId: remoteAttestation.enclaveId,
|
|
|
|
authUsername: remoteAttestation.authUsername,
|
|
|
|
authUsername: remoteAttestation.auth.username,
|
|
|
|
authPassword: remoteAttestation.authToken,
|
|
|
|
authPassword: remoteAttestation.auth.password,
|
|
|
|
cookies: remoteAttestation.cookies)
|
|
|
|
cookies: remoteAttestation.cookies)
|
|
|
|
|
|
|
|
|
|
|
|
self.networkManager.makeRequest(request,
|
|
|
|
self.networkManager.makeRequest(request,
|
|
|
|