diff --git a/SignalServiceKit/src/Messages/OWSMessageManager.m b/SignalServiceKit/src/Messages/OWSMessageManager.m index 890bed12f..ed2a15e84 100644 --- a/SignalServiceKit/src/Messages/OWSMessageManager.m +++ b/SignalServiceKit/src/Messages/OWSMessageManager.m @@ -456,7 +456,7 @@ NS_ASSUME_NONNULL_BEGIN TSContactThread *thread = [TSContactThread getThreadWithContactId:envelope.source transaction:transaction]; if (thread && thread.isContactFriend) { [self resetSessionWithContact:envelope.source transaction:transaction]; - // Let our o ther devices know that we have reset the session + // Let our other devices know that we have reset the session [SSKEnvironment.shared.syncManager syncContact:envelope.source transaction:transaction]; } } diff --git a/SignalServiceKit/src/Messages/OWSMessageSender.m b/SignalServiceKit/src/Messages/OWSMessageSender.m index 43d96ccf0..e170eee2d 100644 --- a/SignalServiceKit/src/Messages/OWSMessageSender.m +++ b/SignalServiceKit/src/Messages/OWSMessageSender.m @@ -1988,21 +1988,11 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException"; // Loki: Both for friend request messages and device link messages we use fallback encryption as we don't necessarily have a session yet BOOL isFriendRequest = [messageSend.message isKindOfClass:LKFriendRequestMessage.class]; -<<<<<<< HEAD BOOL isSessionRequest = [messageSend.message isKindOfClass:LKSessionRequestMessage.class]; - BOOL isDeviceLinkMessage = [messageSend.message isKindOfClass:LKDeviceLinkMessage.class]; - if (isFriendRequest || isSessionRequest || (isDeviceLinkMessage && ((LKDeviceLinkMessage *)messageSend.message).kind == LKDeviceLinkMessageKindRequest)) { - return [self throws_encryptedFriendRequestOrDeviceLinkMessageForMessageSend:messageSend deviceId:@(OWSDevicePrimaryDeviceId) plainText:plainText]; - } -======= BOOL isDeviceLinkMessage = [messageSend.message isKindOfClass:LKDeviceLinkMessage.class] && ((LKDeviceLinkMessage *)messageSend.message).kind == LKDeviceLinkMessageKindRequest; -// if ((isDeviceLinkMessage && ((LKDeviceLinkMessage *)messageSend.message).kind == LKDeviceLinkMessageKindRequest)) { -// return [self throws_encryptedFriendRequestOrDeviceLinkMessageForMessageSend:messageSend deviceId:@(OWSDevicePrimaryDeviceId) plainText:plainText]; -// } ->>>>>>> f4e376bfb47d670f29ab970912d4004f694c1d69 // This may throw an exception. - if (!isFriendRequest && !isDeviceLinkMessage && ![storage containsSession:recipientID deviceId:@(OWSDevicePrimaryDeviceId).intValue protocolContext:transaction]) { + if (!isFriendRequest && !isSessionRequest && !isDeviceLinkMessage && ![storage containsSession:recipientID deviceId:@(OWSDevicePrimaryDeviceId).intValue protocolContext:transaction]) { NSString *missingSessionException = @"missingSessionException"; OWSRaiseException(missingSessionException, @"Unexpectedly missing session for recipient: %@, device: %@", diff --git a/SignalServiceKit/src/Messages/UD/OWSUDManager.swift b/SignalServiceKit/src/Messages/UD/OWSUDManager.swift index b7cb5c737..cdb3b5d99 100644 --- a/SignalServiceKit/src/Messages/UD/OWSUDManager.swift +++ b/SignalServiceKit/src/Messages/UD/OWSUDManager.swift @@ -411,17 +411,6 @@ public class OWSUDManagerImpl: NSObject, OWSUDManager { } public func ensureSenderCertificate(certificateExpirationPolicy: OWSUDCertificateExpirationPolicy) -> Promise { -<<<<<<< HEAD - return Promise(error: "Disabled.") - // If there is a valid cached sender certificate, use that. - // - // NOTE: We use a "strict" expiration policy. - if let certificate = senderCertificate(certificateExpirationPolicy: certificateExpirationPolicy) { - return Promise.value(certificate) - } - -======= ->>>>>>> f4e376bfb47d670f29ab970912d4004f694c1d69 // Try to obtain a new sender certificate. return firstly { generateSenderCertificate()