From 2b8b688fb683b296c69670a4e0ee4516b96f78ea Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 20 Aug 2018 15:38:30 -0400 Subject: [PATCH] Disable CDS. --- .../Contacts/OWSContactDiscoveryOperation.swift | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/SignalServiceKit/src/Contacts/OWSContactDiscoveryOperation.swift b/SignalServiceKit/src/Contacts/OWSContactDiscoveryOperation.swift index 6bf1465cd..24bb13a4f 100644 --- a/SignalServiceKit/src/Contacts/OWSContactDiscoveryOperation.swift +++ b/SignalServiceKit/src/Contacts/OWSContactDiscoveryOperation.swift @@ -85,15 +85,16 @@ class LegacyContactDiscoveryBatchOperation: OWSOperation { // Called at most one time. override func didSucceed() { - if isCDSEnabled { - // Compare against new CDS service - let modernCDSOperation = CDSOperation(recipientIdsToLookup: self.recipientIdsToLookup) - let cdsFeedbackOperation = CDSFeedbackOperation(legacyRegisteredRecipientIds: self.registeredRecipientIds) - cdsFeedbackOperation.addDependency(modernCDSOperation) - - let operations = modernCDSOperation.dependencies + [modernCDSOperation, cdsFeedbackOperation] - CDSOperation.operationQueue.addOperations(operations, waitUntilFinished: false) + guard isCDSEnabled else { + return } + // Compare against new CDS service + let modernCDSOperation = CDSOperation(recipientIdsToLookup: self.recipientIdsToLookup) + let cdsFeedbackOperation = CDSFeedbackOperation(legacyRegisteredRecipientIds: self.registeredRecipientIds) + cdsFeedbackOperation.addDependency(modernCDSOperation) + + let operations = modernCDSOperation.dependencies + [modernCDSOperation, cdsFeedbackOperation] + CDSOperation.operationQueue.addOperations(operations, waitUntilFinished: false) } // MARK: Private Helpers