Post-SMK ud changes.
This commit is contained in:
parent
935aaa4200
commit
71da312336
|
@ -485,7 +485,6 @@
|
|||
B660F6D41C29868000687D6E /* whisperFake.cer in Resources */ = {isa = PBXBuildFile; fileRef = B660F69F1C29868000687D6E /* whisperFake.cer */; };
|
||||
B660F6DB1C29868000687D6E /* FunctionalUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B660F6AD1C29868000687D6E /* FunctionalUtilTest.m */; };
|
||||
B660F6E01C29868000687D6E /* UtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B660F6B41C29868000687D6E /* UtilTest.m */; };
|
||||
B660F7561C29988E00687D6E /* PushManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B9ECFB198B31BA00C620D3 /* PushManager.m */; };
|
||||
B66DBF4A19D5BBC8006EA940 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B66DBF4919D5BBC8006EA940 /* Images.xcassets */; };
|
||||
B67EBF5D19194AC60084CCFD /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B67EBF5C19194AC60084CCFD /* Settings.bundle */; };
|
||||
B69CD25119773E79005CE69A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B69CD25019773E79005CE69A /* XCTest.framework */; };
|
||||
|
@ -3461,7 +3460,6 @@
|
|||
3421981C21061D2E00C57195 /* ByteParserTest.swift in Sources */,
|
||||
34843B26214327C9004DED45 /* OWSOrphanDataCleanerTest.m in Sources */,
|
||||
45360B901F9527DA00FA666C /* SearcherTest.swift in Sources */,
|
||||
B660F7561C29988E00687D6E /* PushManager.m in Sources */,
|
||||
34DB0BED2011548B007B313F /* OWSDatabaseConverterTest.m in Sources */,
|
||||
34843B2C214FE296004DED45 /* MockEnvironment.m in Sources */,
|
||||
45360B911F952AA900FA666C /* MarqueeLabel.swift in Sources */,
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#import "SignalApp.h"
|
||||
#import "SignalsNavigationController.h"
|
||||
#import "ViewControllerUtils.h"
|
||||
#import <AxolotlKit/SessionCipher.h>
|
||||
#import <PromiseKit/AnyPromise.h>
|
||||
#import <SignalCoreKit/iOSVersions.h>
|
||||
#import <SignalMessaging/AppSetup.h>
|
||||
|
@ -1018,6 +1017,11 @@ static NSTimeInterval launchStartedAt;
|
|||
// it will also run all deferred blocks.
|
||||
[AppReadiness setAppIsReady];
|
||||
|
||||
if (CurrentAppContext().isRunningTests) {
|
||||
OWSLogVerbose(@"Skipping post-launch logic in tests.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ([TSAccountManager isRegistered]) {
|
||||
OWSLogInfo(@"localNumber: %@", [TSAccountManager localNumber]);
|
||||
|
||||
|
|
|
@ -487,6 +487,10 @@ typedef void (^OrphanDataBlock)(OWSOrphanData *);
|
|||
OWSFailDebug(@"can't audit orphan data in app extensions.");
|
||||
return;
|
||||
}
|
||||
if (CurrentAppContext().isRunningTests) {
|
||||
OWSLogVerbose(@"Ignoring audit orphan data in tests.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Orphan cleanup has two risks:
|
||||
//
|
||||
|
|
|
@ -51,8 +51,8 @@ class ConversationSearcherContactsManager: NSObject, ContactsManagerProtocol {
|
|||
}
|
||||
}
|
||||
|
||||
let bobRecipientId = "+49030183000"
|
||||
let aliceRecipientId = "+12345678900"
|
||||
private let bobRecipientId = "+49030183000"
|
||||
private let aliceRecipientId = "+12345678900"
|
||||
|
||||
class ConversationSearcherTest: SignalBaseTest {
|
||||
|
||||
|
|
|
@ -497,8 +497,8 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
|
|||
}
|
||||
case OWSVerificationStateNoLongerVerified: {
|
||||
OWSLogInfo(@"marked recipient: %@ as default verification status.", recipientId);
|
||||
NSData *identityKey =
|
||||
[[OWSIdentityManager sharedManager] identityKeyForRecipientId:recipientId transaction:transaction];
|
||||
NSData *identityKey = [[OWSIdentityManager sharedManager] identityKeyForRecipientId:recipientId
|
||||
protocolContext:transaction];
|
||||
OWSAssertDebug(identityKey);
|
||||
[[OWSIdentityManager sharedManager] setVerificationState:OWSVerificationStateDefault
|
||||
identityKey:identityKey
|
||||
|
|
|
@ -31,11 +31,6 @@ extern const NSUInteger kIdentityKeyLength;
|
|||
|
||||
- (void)generateNewIdentityKey;
|
||||
|
||||
- (nullable NSData *)identityKeyForRecipientId:(NSString *)recipientId;
|
||||
|
||||
- (nullable NSData *)identityKeyForRecipientId:(NSString *)recipientId
|
||||
transaction:(YapDatabaseReadTransaction *)transaction;
|
||||
|
||||
- (void)setVerificationState:(OWSVerificationState)verificationState
|
||||
identityKey:(NSData *)identityKey
|
||||
recipientId:(NSString *)recipientId
|
||||
|
|
|
@ -129,6 +129,15 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa
|
|||
return result;
|
||||
}
|
||||
|
||||
- (nullable NSData *)identityKeyForRecipientId:(NSString *)recipientId protocolContext:(nullable id)protocolContext
|
||||
{
|
||||
OWSAssertDebug([protocolContext isKindOfClass:[YapDatabaseReadTransaction class]]);
|
||||
|
||||
YapDatabaseReadTransaction *transaction = protocolContext;
|
||||
|
||||
return [self identityKeyForRecipientId:recipientId transaction:transaction];
|
||||
}
|
||||
|
||||
- (nullable NSData *)identityKeyForRecipientId:(NSString *)recipientId
|
||||
transaction:(YapDatabaseReadTransaction *)transaction
|
||||
{
|
||||
|
|
|
@ -955,7 +955,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
}
|
||||
NSData *profileKey = dataMessage.profileKey;
|
||||
if (profileKey.length != kAES256_KeyByteLength) {
|
||||
OWSFailDebug(@"received profile key of unexpected length:%lu from:%@",
|
||||
OWSFailDebug(@"received profile key of unexpected length: %lu, from: %@",
|
||||
(unsigned long)profileKey.length,
|
||||
envelopeAddress(envelope));
|
||||
return;
|
||||
|
|
|
@ -1402,12 +1402,14 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|||
|
||||
- (TSWhisperMessageType)messageTypeForCipherMessage:(id<CipherMessage>)cipherMessage
|
||||
{
|
||||
if ([cipherMessage isKindOfClass:[PreKeyWhisperMessage class]]) {
|
||||
return TSPreKeyWhisperMessageType;
|
||||
} else if ([cipherMessage isKindOfClass:[WhisperMessage class]]) {
|
||||
return TSEncryptedWhisperMessageType;
|
||||
switch (cipherMessage.cipherMessageType) {
|
||||
case CipherMessageType_Whisper:
|
||||
return TSEncryptedWhisperMessageType;
|
||||
case CipherMessageType_Prekey:
|
||||
return TSPreKeyWhisperMessageType;
|
||||
default:
|
||||
return TSUnknownMessageType;
|
||||
}
|
||||
return TSUnknownMessageType;
|
||||
}
|
||||
|
||||
- (void)saveGroupMessage:(TSOutgoingMessage *)message inThread:(TSThread *)thread
|
||||
|
|
|
@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
Contact *b = resortedContacts[j];
|
||||
BOOL correct = ([a.firstName isEqualToString:b.firstName] && [a.lastName isEqualToString:b.lastName]);
|
||||
if (!correct) {
|
||||
XCTAssert(@"Contacts failed to sort names by first, last");
|
||||
XCTFail(@"Contacts failed to sort names by first, last");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
Contact *b = resortedContacts[j];
|
||||
BOOL correct = ([a.firstName isEqualToString:b.firstName] && [a.lastName isEqualToString:b.lastName]);
|
||||
if (!correct) {
|
||||
XCTAssert(@"Contacts failed to sort names by last, first");
|
||||
XCTFail(@"Contacts failed to sort names by last, first");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue