|
|
|
@ -212,7 +212,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
#pragma mark - message handling
|
|
|
|
|
|
|
|
|
|
- (void)processEnvelope:(SSKProtoEnvelope *)envelope
|
|
|
|
|
- (void)try_processEnvelope:(SSKProtoEnvelope *)envelope
|
|
|
|
|
plaintextData:(NSData *_Nullable)plaintextData
|
|
|
|
|
transaction:(YapDatabaseReadWriteTransaction *)transaction
|
|
|
|
|
{
|
|
|
|
@ -256,7 +256,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
OWSFailDebug(@"missing decrypted data for envelope: %@", [self descriptionForEnvelope:envelope]);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
[self handleEnvelope:envelope plaintextData:plaintextData transaction:transaction];
|
|
|
|
|
[self try_handleEnvelope:envelope plaintextData:plaintextData transaction:transaction];
|
|
|
|
|
break;
|
|
|
|
|
case SSKProtoEnvelopeTypeReceipt:
|
|
|
|
|
OWSAssertDebug(!plaintextData);
|
|
|
|
@ -345,7 +345,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)handleEnvelope:(SSKProtoEnvelope *)envelope
|
|
|
|
|
- (void)try_handleEnvelope:(SSKProtoEnvelope *)envelope
|
|
|
|
|
plaintextData:(NSData *)plaintextData
|
|
|
|
|
transaction:(YapDatabaseReadWriteTransaction *)transaction
|
|
|
|
|
{
|
|
|
|
@ -395,7 +395,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
OWSLogInfo(@"handling content: <Content: %@>", [self descriptionForContent:contentProto]);
|
|
|
|
|
|
|
|
|
|
if (contentProto.syncMessage) {
|
|
|
|
|
[self handleIncomingEnvelope:envelope withSyncMessage:contentProto.syncMessage transaction:transaction];
|
|
|
|
|
[self try_handleIncomingEnvelope:envelope withSyncMessage:contentProto.syncMessage transaction:transaction];
|
|
|
|
|
|
|
|
|
|
[[OWSDeviceManager sharedManager] setHasReceivedSyncMessage];
|
|
|
|
|
} else if (contentProto.dataMessage) {
|
|
|
|
@ -745,7 +745,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
}];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)handleIncomingEnvelope:(SSKProtoEnvelope *)envelope
|
|
|
|
|
- (void)try_handleIncomingEnvelope:(SSKProtoEnvelope *)envelope
|
|
|
|
|
withSyncMessage:(SSKProtoSyncMessage *)syncMessage
|
|
|
|
|
transaction:(YapDatabaseReadWriteTransaction *)transaction
|
|
|
|
|
{
|
|
|
|
@ -862,7 +862,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
transaction:transaction];
|
|
|
|
|
} else if (syncMessage.verified) {
|
|
|
|
|
OWSLogInfo(@"Received verification state for %@", syncMessage.verified.destination);
|
|
|
|
|
[self.identityManager processIncomingSyncMessage:syncMessage.verified transaction:transaction];
|
|
|
|
|
[self.identityManager try_processIncomingSyncMessage:syncMessage.verified transaction:transaction];
|
|
|
|
|
} else {
|
|
|
|
|
OWSLogWarn(@"Ignoring unsupported sync message.");
|
|
|
|
|
}
|
|
|
|
|