Remove unused code

pull/63/head
Niels Andriesse 6 years ago
parent 897147bbf5
commit 954b4567fb

@ -1349,15 +1349,6 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
[SignalRecipient markRecipientAsRegisteredAndGet:recipient.recipientId transaction:transaction]; [SignalRecipient markRecipientAsRegisteredAndGet:recipient.recipientId transaction:transaction];
}]; }];
// Loki: Check if we need to generate a link preview
TSMessage *message = messageSend.message;
if (message.linkPreview == nil && !message.hasAttachments) {
dispatch_async(dispatch_get_main_queue(), ^{
NSString *linkPreviewURL = [OWSLinkPreview previewURLForRawBodyText:message.body];
if (linkPreviewURL) { [message generateLinkPreviewIfNeededFromURL:linkPreviewURL]; }
});
}
messageSend.success(); messageSend.success();
}); });
} }
@ -1733,7 +1724,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
} }
PreKeyBundle *_Nullable bundle = [storage getPreKeyBundleForContact:recipientId]; PreKeyBundle *_Nullable bundle = [storage getPreKeyBundleForContact:recipientId];
__block NSException *_Nullable exception; __block NSException *exception;
/** Loki: Original code /** Loki: Original code
* ================ * ================
@ -1782,7 +1773,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
@try { @try {
[builder throws_processPrekeyBundle:bundle protocolContext:transaction]; [builder throws_processPrekeyBundle:bundle protocolContext:transaction];
// Loki: Discard the prekey bundle here since the session is initiated // Loki: Discard the pre key bundle here since the session has been established
[storage removePreKeyBundleForContact:recipientId transaction:transaction]; [storage removePreKeyBundleForContact:recipientId transaction:transaction];
} @catch (NSException *caughtException) { } @catch (NSException *caughtException) {
exception = caughtException; exception = caughtException;

Loading…
Cancel
Save