diff --git a/Podfile b/Podfile index e8031bb64..228be5bb6 100644 --- a/Podfile +++ b/Podfile @@ -19,7 +19,7 @@ def shared_pods pod 'Curve25519Kit', git: 'https://github.com/signalapp/Curve25519Kit', testspecs: ["Tests"] # pod 'Curve25519Kit', path: '../Curve25519Kit', testspecs: ["Tests"] # TODO: Use public repo. - pod 'SignalMetadataKit', git: 'https://github.com/signalapp/SignalMetadataKit', testspecs: ["Tests"], branch: 'charlesmchen/discardSelfSentMessages' + pod 'SignalMetadataKit', git: 'https://github.com/signalapp/SignalMetadataKit', testspecs: ["Tests"] # pod 'SignalMetadataKit', path: '../SignalMetadataKit', testspecs: ["Tests"] pod 'SignalServiceKit', path: '.', testspecs: ["Tests"] pod 'GRKOpenSSLFramework', git: 'https://github.com/signalapp/GRKOpenSSLFramework' diff --git a/Podfile.lock b/Podfile.lock index aaf2e22cf..1b830b351 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -196,8 +196,8 @@ DEPENDENCIES: - Reachability - SignalCoreKit (from `https://github.com/signalapp/SignalCoreKit.git`) - SignalCoreKit/Tests (from `https://github.com/signalapp/SignalCoreKit.git`) - - SignalMetadataKit (from `https://github.com/signalapp/SignalMetadataKit`, branch `charlesmchen/discardSelfSentMessages`) - - SignalMetadataKit/Tests (from `https://github.com/signalapp/SignalMetadataKit`, branch `charlesmchen/discardSelfSentMessages`) + - SignalMetadataKit (from `https://github.com/signalapp/SignalMetadataKit`) + - SignalMetadataKit/Tests (from `https://github.com/signalapp/SignalMetadataKit`) - SignalServiceKit (from `.`) - SignalServiceKit/Tests (from `.`) - SocketRocket (from `https://github.com/signalapp/SocketRocket.git`, branch `mkirk/handle-sec-err`) @@ -233,7 +233,6 @@ EXTERNAL SOURCES: SignalCoreKit: :git: https://github.com/signalapp/SignalCoreKit.git SignalMetadataKit: - :branch: charlesmchen/discardSelfSentMessages :git: https://github.com/signalapp/SignalMetadataKit SignalServiceKit: :path: "." @@ -264,7 +263,7 @@ CHECKOUT OPTIONS: :commit: ff0b95770520133b83a4bd7b26bc2c90b51abc4d :git: https://github.com/signalapp/SignalCoreKit.git SignalMetadataKit: - :commit: 0ff4673181315f5bd7b883a87b783b5772f7b412 + :commit: beb10a358db0202228b8d67bcb466d877fefb405 :git: https://github.com/signalapp/SignalMetadataKit SocketRocket: :commit: 9f9563a83cd8960503074aa8de72206f83fb7a69 @@ -299,6 +298,6 @@ SPEC CHECKSUMS: YapDatabase: b418a4baa6906e8028748938f9159807fd039af4 YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54 -PODFILE CHECKSUM: b4815f8e6306c08266b24710736a8c956b666aa1 +PODFILE CHECKSUM: 820287bc7925d7c20e02a02923976c60b1f5386b COCOAPODS: 1.5.3 diff --git a/SignalMessaging/environment/migrations/OWS111UDAttributesMigration.swift b/SignalMessaging/environment/migrations/OWS111UDAttributesMigration.swift index 708d0cd08..98f35617a 100644 --- a/SignalMessaging/environment/migrations/OWS111UDAttributesMigration.swift +++ b/SignalMessaging/environment/migrations/OWS111UDAttributesMigration.swift @@ -19,6 +19,8 @@ public class OWS111UDAttributesMigration: OWSDatabaseMigration { // increment a similar constant for each migration. @objc class func migrationId() -> String { + // NOTE: Changes were made to the service after this migration was initially + // merged, so we need to re-migrate any developer devices. return "111.1" } diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m index 4c398c2b3..97264b96f 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m @@ -117,7 +117,7 @@ NS_ASSUME_NONNULL_BEGIN NSOutputStream *dataOutputStream = [NSOutputStream outputStreamToMemory]; [dataOutputStream open]; OWSContactsOutputStream *contactsOutputStream = - [[OWSContactsOutputStream alloc] initWithOutputStream:dataOutputStream]; + [[OWSContactsOutputStream alloc] initWithOutputStream:dataOutputStream]; for (SignalAccount *signalAccount in signalAccounts) { OWSRecipientIdentity *_Nullable recipientIdentity = diff --git a/SignalServiceKit/src/Messages/OWSMessageDecrypter.m b/SignalServiceKit/src/Messages/OWSMessageDecrypter.m index 35817bcba..8e7b51445 100644 --- a/SignalServiceKit/src/Messages/OWSMessageDecrypter.m +++ b/SignalServiceKit/src/Messages/OWSMessageDecrypter.m @@ -459,7 +459,8 @@ NSError *EnsureDecryptError(NSError *_Nullable error, NSString *fallbackErrorDes protocolContext:transaction error:&error]; if (error || !decryptResult) { - if ([error.domain isEqualToString:@"SignalMetadataKit.SMKSelfSentMessageError"]) { + if ([error.domain isEqualToString:@"SignalMetadataKit.SMKSecretSessionCipherError"] + && error.code == SMKSecretSessionCipherErrorSelfSentMessage) { // Self-sent messages can be safely discarded. return failureBlock(error); }