|
|
|
@ -683,7 +683,11 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)processIncomingSyncMessage:(OWSSignalServiceProtosVerified *)verified
|
|
|
|
|
transaction:(YapDatabaseReadWriteTransaction *)transaction
|
|
|
|
|
{
|
|
|
|
|
OWSAssert(verified);
|
|
|
|
|
OWSAssert(transaction);
|
|
|
|
|
|
|
|
|
|
NSString *recipientId = verified.destination;
|
|
|
|
|
if (recipientId.length < 1) {
|
|
|
|
|
OWSFail(@"Verification state sync message missing recipientId.");
|
|
|
|
@ -698,8 +702,6 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa
|
|
|
|
|
}
|
|
|
|
|
NSData *identityKey = [rawIdentityKey removeKeyType];
|
|
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction * transaction) {
|
|
|
|
|
switch (verified.state) {
|
|
|
|
|
case OWSSignalServiceProtosVerifiedStateDefault:
|
|
|
|
|
[self tryToApplyVerificationStateFromSyncMessage:OWSVerificationStateDefault
|
|
|
|
@ -721,9 +723,8 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa
|
|
|
|
|
OWSVerificationStateToString(OWSVerificationStateNoLongerVerified));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
[self fireIdentityStateChangeNotification];
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)tryToApplyVerificationStateFromSyncMessage:(OWSVerificationState)verificationState
|
|
|
|
|