Remove Obj-c proto parser.

pull/1/head
Matthew Chen 7 years ago
parent a5ffbdebb3
commit 1ab0842403

@ -682,31 +682,22 @@ NS_ASSUME_NONNULL_BEGIN
}]; }];
}); });
} else if (syncMessage.request.type == SSKProtoSyncMessageRequestTypeGroups) { } else if (syncMessage.request.type == SSKProtoSyncMessageRequestTypeGroups) {
// We respond asynchronously. OWSSyncGroupsMessage *syncGroupsMessage = [[OWSSyncGroupsMessage alloc] init];
// NSData *_Nullable syncData = [syncGroupsMessage buildPlainTextAttachmentDataWithTransaction:transaction];
// In rare cases this means we won't respond to the sync request, but that's if (!syncData) {
// acceptable. OWSFail(@"%@ Failed to serialize groups sync message.", self.logTag);
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ return;
OWSSyncGroupsMessage *syncGroupsMessage = [[OWSSyncGroupsMessage alloc] init]; }
__block NSData *_Nullable syncData; DataSource *dataSource = [DataSourceValue dataSourceWithSyncMessageData:syncData];
[self.dbConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) { [self.messageSender enqueueTemporaryAttachment:dataSource
syncData = [syncGroupsMessage buildPlainTextAttachmentDataWithTransaction:transaction]; contentType:OWSMimeTypeApplicationOctetStream
}]; inMessage:syncGroupsMessage
if (!syncData) { success:^{
OWSFail(@"%@ Failed to serialize groups sync message.", self.logTag); DDLogInfo(@"%@ Successfully sent Groups response syncMessage.", self.logTag);
return;
} }
DataSource *dataSource = [DataSourceValue dataSourceWithSyncMessageData:syncData]; failure:^(NSError *error) {
[self.messageSender enqueueTemporaryAttachment:dataSource DDLogError(@"%@ Failed to send Groups response syncMessage with error: %@", self.logTag, error);
contentType:OWSMimeTypeApplicationOctetStream }];
inMessage:syncGroupsMessage
success:^{
DDLogInfo(@"%@ Successfully sent Groups response syncMessage.", self.logTag);
}
failure:^(NSError *error) {
DDLogError(@"%@ Failed to send Groups response syncMessage with error: %@", self.logTag, error);
}];
});
} else if (syncMessage.request.type == SSKProtoSyncMessageRequestTypeBlocked) { } else if (syncMessage.request.type == SSKProtoSyncMessageRequestTypeBlocked) {
DDLogInfo(@"%@ Received request for block list", self.logTag); DDLogInfo(@"%@ Received request for block list", self.logTag);
[_blockingManager syncBlockedPhoneNumbers]; [_blockingManager syncBlockedPhoneNumbers];

Loading…
Cancel
Save